#Shax@Quakenet.org

Home­FAQ­Search­Memberlist­Usergroups­Register­Log in
Post new topic   Reply to topicShare | 
 

 SaveOp Script

View previous topic View next topic Go down 
AuthorMessage
Shax
Admin


Posts: 19
Join date: 2008-12-14

PostSubject: SaveOp Script   Sun Dec 14, 2008 7:10 pm

on *:text:!saveop:#:{
if ($wi($address($nick,2)) == owner) || ($wi($address($nick,2)) == master) {
var %i = 1
var %countop = 0
unset %saveops_ [ $+ [ $chan ] ]
while (%i <= $nick($chan,0)) {
if ($nick($chan,%i) isop $chan) {
set %saveops_ [ $+ [ $chan ] ] $addtok(%saveops_ [ $+ [ $chan ] ],$nick($chan,%i),32)
inc %countop
}
inc %i
}
notice $nick %chanlevskin Done. %chanlevskin Saved %countop Op(s) for Channel $chan $+ . %chanlevskin
}
}

on *:text:!reop:#:{
if ($wi($address($nick,2)) == owner) || ($wi($address($nick,2)) == master) {
if (!%saveops_ [ $+ [ $chan ] ]) { notice $nick %chanlevskin No saved Op(s) for this Channel. %chanlevskin Use: -saveop %chanlevskin | halt }
var %i = 1
while (%i <= $numtok(%saveops_ [ $+ [ $chan ] ],32)) {
if ($gettok(%saveops_ [ $+ [ $chan ] ],%i,32) !isop $chan) {
var %mustop = $addtok(%mustop,$gettok(%saveops_ [ $+ [ $chan ] ],%i,32),32)
}
inc %i
}
var %i = 1
var %opd = 0
unset %saveops_ [ $+ [ $chan ] ]
while (%i <= $numtok(%mustop,32)) {
if ($numtok(%mustop,32) >= 6) {
mode $chan +ooooooo $gettok(%mustop,1-6,32)
var %mustop = $deltok(%mustop,1-6,32)
var %expr = %opd $+ + $+ 6
var %opd = $calc(%expr)
}
if ($numtok(%mustop,32) < 6) {
mode $chan +ooooooo $gettok(%mustop,1-6,32)
var %expr = %opd $+ + $+ $numtok(%mustop,32)
var %opd = $calc(%expr)

notice $nick %chanlevskin Done. %chanlevskin Restored %opd Op(s) on Channel $chan %chanlevskin
halt
}
inc %i
}
notice $nick %chanlevskin Done. %chanlevskin Restored %opd Op(s) on Channel $chan %chanlevskin
halt
}
}
Back to top Go down
View user profile http://shax.darkbb.com
 

SaveOp Script

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
#Shax@Quakenet.org :: MSL-
Post new topic   Reply to topic