Untitled
By: a guest | Feb 9th, 2010 | Syntax:
PHP | Size: 0.89 KB | Hits: 24 | Expires: Never
function systemHelper(&$irc, &$data) {
//explode their text to pull apart the topic and target.
$topic = explode(":",$data->message);
$nickname = explode(" ", $data->message);
$irc->message(SMARTIRC_TYPE_CHANNEL, '#help', "The correct syntax is !help <user>:<topic>");
}
else {
$getHelp = systemHelp($topic[1]);
if($getHelp == "ERROR") {
$irc->message(SMARTIRC_TYPE_CHANNEL, '#help', $topic[1]." is not a valid help string");
}
foreach ($irc->channel['#help']->users as $key => $value) {
if(stristr($nickname[1
],$key)===TRUE) {
$foundNick = TRUE;
}
else {
$foundNick = FALSE;
}
}
if($foundNick == TRUE) {
$irc->message(SMARTIRC_TYPE_CHANNEL, '#help', $nickname[1].": ".$getHelp);
}
else {
$irc->message(SMARTIRC_TYPE_CHANNEL, '#help', $getHelp);
}
}
}