### (C) 1999 - 2001 ## - Viha (Viha@Theblah.Org) # - Karzan (Kari@Theblah.Org) ## Credits also go to: # - LuckyS (lucky@binet.lv) [bug reports] # - Fusion (fusion@nuts.edu) [bug reports] # - RA^v^EN (raven@sky.siol.org) [bug reports] # - tumble (tumble@openface.ca) [beta testing] # - koopal (andre@nl.uu.net) [script ideas] # - pt (primetime@wnol.net) [script ideas] # - delta (delta@rus.uni-stuttgart.de) [script ideas] # - pht (svobodam@irc.vsp.cz) [bug reports] # - enge (engerim@magicnet.org) [modifications] ## II - A fully recoded version with a little more functionality. # Since 23/12/98, v. 2.01b ## ChangeLog: # v2.01b+enge - New command "damode" to get the mode # of a channel. # v2.01b - Changed the format of ASSIGNs, added # a configurable section. Totally re- # written etc. # v2.03 - Typofixes, added security, cleaned # up. Invait now works channel-wide. # v2.04 - Added a more paranoid vop. # v2.04+ - Even more vop additions and a define # for the vop channel. # v2.05 - Typofixes, cmdchar independence. # v2.06b - Sigh, hopefully better cmdchar sup- # port. More channel independance. The # first public release. # v2.07 - Fixed a "typo" in the invait request # shown to the person running the scr- # ipt. Patched vop, added vop delay. # v2.07+ - Sigh. The fix in 2.07 was completed. # v2.08b - Nothing new, except for a fix to # display the correct operit notice # (public/msg). # v2.09 - Better support for !channels. Fixed # some nasty bugs. ## NOTES: # You should NOT load OperitII on top # of the old series to avoid possible # malfunctioning. Instead, just load # it on the next restart. There are no # killer changes that would make it # necessary for everyone to upgrade # immediately. # The most recent version can always be found at # http://www.vip.fi/~viha/irc/ # This will restore your command character after # the script has been loaded. eval ^assign abs.cmdchar $K ^set CMDCHARS / //^set NOVICE off //^assign abs.operit.ver 2.09beta2[ii]+enge ### --- BEGIN CONFIGURABLE SECTION --- # The channelmask operit/invait is permitted on. (* is *) //^assign abs.operit.chans #* !* # The channel(s) operit/invait is not permitted on. (* is *) //^assign abs.operit.denyc #nico #hf #ecstasy # The user@host(s) operit/invait is not permitted from. (* is *) //^assign abs.operit.denyh *!*@*.cx *bsx.ru # Uncomment this, if you don't actually want invait/operit to function. # //^assign abs.operit.deny 1 # Which channel 'vop' works on. Only change this for a good reason. //^assign abs.operit.vopchan #Opers #cz-opers #eu-opers !JNB4Sircd #v6 !RVUWIeu-opers # Vop delay (between accepting new requests, in seconds). (numbers <20 disencouraged) @ abs.operit.delay = 25 ### --- END CONFIGURABLE SECTION --- //^alias nickonly ^assign FUNCTION_RETURN $left($index(! $0) $0) eval //^on -raw_irc "% PRIVMSG % :invait %" abs.operit.function $$* eval //^on -raw_irc "% PRIVMSG % :operit %" abs.operit.function $$* eval //^on -raw_irc "% PRIVMSG % :damode %" abs.operit.function $$* eval //^on -raw_irc "% PRIVMSG % :vop" { if ([$2]==[$N]) { if (![$abs.operit.queueB]&&![$abs.operit.deny]&&![$abs.operit.queue]&&![$abs.operit.disp]) { @ abs.operit.delay = abs.operit.delay + 2 timer $rand(10) ${K}mode $abs.operit.vopchan v $nickonly($0) ^assign abs.operit.queueB 1 ^timer $abs.operit.delay ^assign -abs.operit.queueB ^timer 1800 @ abs.operit.delay = abs.operit.delay - 1 } } } //^on -ctcp "% % operit %" { if (![$abs.operit.queueB]) { @ abs.operit.delay = abs.operit.delay + 2 timer $rand(8) ${K}${K}notice $0 tsk. it's via e-mail ^assign abs.operit.queueB 1 ^timer $abs.operit.delay ^assign -abs.operit.queueB ^timer 1800 @ abs.operit.delay = abs.operit.delay - 1 } } eval echo *** OperitII.irc $abs.operit.ver by Viha & Karzan loading. //^assign -abs.operit.queue //^assign -abs.operit.queueB @ abs.operit.count.operit = 0 @ abs.operit.count.invait = 0 @ abs.operit.count.damode = 0 //^alias abs.operit.function { if (![$abs.operit.deny]&&![$abs.operit.queue]&&![$abs.operit.disp]) { ^assign abs.operit.target $2 ^assign abs.operit.cmd $strip(: $3) if ([$abs.operit.target]==[$N]||[$abs.operit.cmd]==[invait]) { ^assign abs.operit.temppu.chan $4 ^assign abs.operit.temppu.host $0 ${K}${K}^on ^311 * # ${K}${K}^on ^319 * # ${K}${K}^on ^317 * # ${K}${K}^on ^312 * # eval ${K}${K}^on ^313 "% $nickonly($abs.operit.temppu.host) *" abs.operit.function.sub ${K}${K}whois $nickonly($abs.operit.temppu.host) ${K}${K}^assign abs.operit.queue 1 timer 6 ${K}${K}^assign -abs.operit.queue timer 6 ${K}${K}^on ^311 -* # timer 6 ${K}${K}^on ^319 -* # timer 6 ${K}${K}^on ^317 -* # timer 6 ${K}${K}^on ^312 -* # timer 6 eval ${K}${K}^on ^313 -"% $nickonly($abs.operit.temppu.host) *" abs.operit.function.sub } } { if (![$abs.operit.disp]) { echo *** Operit currently deactivated or queued. Request ignored. ^assign abs.operit.disp 1 ${K}${K}timer 20 ${K}^assign -abs.operit.disp } } } alias abs.operit.function.sub { if ([$abs.operit.target]==[$N]) { echo *** [$abs.operit.temppu.host] requested MSG $abs.operit.cmd on channel(s) $abs.operit.temppu.chan } { echo *** [$abs.operit.temppu.host] requested PUBLIC $abs.operit.cmd on channel(s) $abs.operit.temppu.chan } if ((!rmatch($abs.operit.temppu.chan $abs.operit.denyc))&&(rmatch($abs.operit.temppu.chan $abs.operit.chans))&&(!rmatch($abs.operit.temppu.chan *,$N*))&&(!rmatch($abs.operit.temppu.host $abs.operit.denyh))) { if ([$abs.operit.cmd]==[operit]) { timer $rand(3) ${K}${K}mode $abs.operit.temppu.chan o $nickonly($abs.operit.temppu.host) @ abs.operit.count.operit = abs.operit.count.operit + 1 } if ([$abs.operit.cmd]==[invait]) { timer $rand(3) ${K}${K}invite $nickonly($abs.operit.temppu.host) $abs.operit.temppu.chan @ abs.operit.count.invait = abs.operit.count.invait + 1 } if ([$abs.operit.cmd]==[damode]) { notice $nickonly($abs.operit.temppu.host) mode for $abs.operit.temppu.chan is "$chanmode($abs.operit.temppu.chan)" } } { echo *** [$abs.operit.temppu.host] is on your blacklist. Ignored. <$abs.operit.temppu.chan> } timer 2 ${K}${K}^on ^311 -* # timer 2 ${K}${K}^on ^319 -* # timer 2 ${K}${K}^on ^317 -* # timer 2 ${K}${K}^on ^312 -* # } alias operit.usage { echo *** echo *** Operit Usage: echo *** echo *** ${K}operit.status - Display statistical information. echo *** ${K}msg $N operit #chan - Op the person in question on #chan. (req. *) echo *** ${K}msg $N invait #chan - Invait the person in question to #chan. (req. *) echo *** ${K}msg $N damode #chan - Give the person in question the modes of #chan. (req. *) echo *** ${K}msg $N vop - Voice the person in question on $abs.operit.vopchan$999. (-) echo *** # echo  } alias operit.status { @ abs.operit.count.total = abs.operit.count.operit + abs.operit.count.invait + abs.operit.count.damode echo *** echo *** Operit Status, v. $abs.operit.ver: echo *** if ([$abs.operit.count.total]<1) { echo *** No requests have yet been made. } { echo *** The last person to request $abs.operit.cmd was $abs.operit.temppu.host [$abs.operit.temppu.chan]. echo *** This session has served $abs.operit.count.operit op-requests, $abs.operit.count.invait invite-requests and $abs.operit.count.damode mode-requests. echo *** echo *** Making a total of $abs.operit.count.total succesful requests. } # echo  echo *** } sleep 1 eval //^set CMDCHARS $abs.cmdchar eval echo *** OperitII.irc $abs.operit.ver Loaded succesfully. Try ${K}operit.usage for help.