function chansel_RcvTell($Params) { global $Bot; if (!isset($Params[1][1])) { $Blob = new ChatBlob(); $Blob->Template(BLOB_CHOOSECHAN); $Bot->SendTell($Params[0], "Choose a channel for your shop by clicking " . $Blob->Output); unset($Blob); } else { $Bot->ChatChannel = $Params[1][1]; $Bot->ValidateChanMsg(); } }
function ValidateChanMsg() { $i = $this->ChatChannel; /*** Validations *****/ if (!isset($this->ChatGroups[$i])) { $this->SendTell($this->ShopAdministrator, 'Invalid channel ID!'); $fail = true; } elseif (substr(bin2hex($this->ChatGroups[$i][0]), 0, 2) != 86) { $this->SendTell($this->ShopAdministrator, 'This channel is not a shopping channel!'); $fail = true; } if (isset($fail)) { $this->ChatChannel = NULL; $Blob = new ChatBlob(); $Blob->Template(BLOB_CHOOSECHAN); $this->SendTell($this->ShopAdministrator, "Choose a channel for your shop by clicking " . $Blob->Output); unset($Blob); } else { $this->SendTell($this->ShopAdministrator, "Channel " . $this->ChatGroups[$i][1] . ' Selected.'); } }