rendered paste body<?php
// Module to Ignore and Unignore Users
// Copyright (c) Charlie Melbye, All Rights Reserved
//
// Part of the BONO IRC Bot
$theParmP1=explode("PRIVMSG $channel :".$comchar."ignore ",$bufferO);
$theParm=$theParmP1[1];
$theParm=trim($theParm);
if(stristr($bufferO,"PRIVMSG $channel :".$comchar."ignore ") OR stristr($bufferO,"PRIVMSG $sender :".$comchar."ignore ")){
if(in_array(substr(strtolower($buffer),1,strpos($buffer,"!")-1),$admin) and in_array($senderHost,$adminHostmask)){
$ignoredUsers[] = $theParm;
$returnignore = "$theParm has been ignored.";
}
}
cs('ignore', $returnignore, true);
$returnignore = "";
$theParmP1=explode("PRIVMSG $channel :".$comchar."unignore ",$bufferO);
$theParm=$theParmP1[1];
$theParm=trim($theParm);
if(stristr($bufferO,"PRIVMSG $channel :".$comchar."unignore ") OR stristr($bufferO,"PRIVMSG $sender :".$comchar."unignore ")){
if(in_array(substr(strtolower($buffer),1,strpos($buffer,"!")-1),$admin) and in_array($senderHost,$adminHostmask)){
$ignoreid = array_search($theParm, $ignoredUsers);
unset($ignoredUsers[$ignoreid]);
$unresult = "$theParm (ID $ignoreid) has been unignored.";
}
}
cs('unignore', $unresult, true);
$unresult = "";
if(stristr($bufferO,"PRIVMSG $channel :".$comchar."ignored") OR stristr($bufferO,"PRIVMSG $sender :".$comchar."ignored")){
$ignoredlist = "";
foreach($ignoredUsers as $iggy) {
$ignoredlist .= $iggy.", ";
}
}
$ignoredlist=trim($ignoredlist,", ");
cs('ignored', 'Ignored Users: '.$ignoredlist, false);
$ignoredlist = "";
?>