i need some one to help me add "(trigger)sbnc simul <ident> <cmd>"
i know its geex script, tryed to ask him to do it but he dident ansawred -.-
- Code: Select all
# Manages your sbnc over irc
# configuration
# variables
set sbnc(trigger) "\$"
set sbnc(version) "2.0"
set sbnc(author) "Made By: #GeeX"
set sbnc(chan) "#ITgamers"
set sbnc(ident) "IDENT"
set sbnc(ircserver) "no.quakenet.org 6667"
set sbnc(server) "IP"
set sbnc(port) "PORT"
set sbnc(realname) "sBNC - By: #ITgamers - www.ITgamers.no"
set sbnc(iface) "none"
# bindings
bind PUB m|- $sbnc(trigger)sbnc sbnc:iface
# copyright
putlog "sBNC Script version $sbnc(version) scripted by $sbnc(author)"
# source (again DO NOT change anything if you are not 100% sure)
proc sbnc:iface { nick host hand chan arg } {
global sbnc
switch -exact -- [string tolower [lindex [split $arg] 0]] {
"add" {
set ident [lindex [split $arg] 1]
set password [expr {int(rand()*1000000) + 1}]
set bncuser [lindex [split $arg] 2]
if {$ident == ""} {
putserv "NOTICE $nick :Error. Wrong syntax. Use $sbnc(trigger)sbnc add 'ident' ?nick?."
return
}
putquick "SBNC ADDUSER $ident $password"
putquick "SBNC SIMUL $ident SBNC SET REALNAME $sbnc(realname)"
putquick "SBNC SIMUL $ident SBNC SET SERVER $sbnc(ircserver)"
utimer 60 [list putquick "SBNC SIMUL $ident JOIN $sbnc(chan)"]
putquick "NOTICE $nick :Done. New bnc added!"
if {$bncuser == ""} {
return
} elseif {[onchan $bncuser $chan]} {
putserv "PRIVMSG $bncuser :BNC INFO - $bncuser:"
putserv "PRIVMSG $bncuser :Server: $sbnc(server), Port: $sbnc(port), Ident: $ident, Password: $password, Webinterface: $sbnc(iface)"
putserv "PRIVMSG $bncuser :If you need help, just join: $sbnc(chan)"
} else {
putserv "NOTICE $nick :Error. $bncuser is not on $chan."
return
}
}
"del" {
set ident [lindex [split $arg] 1]
if {$ident == ""} {
putserv "NOTICE $nick :Error. Wrong syntax. Use $sbnc(trigger)sbnc del 'ident'."
return
} else {
putquick "SBNC DELUSER $ident"
putquick "NOTICE $nick :Done. User ($ident) deleted."
}
}
"password" {
set ident [lindex [split $arg] 1]
set password [expr {int(rand()*1000000) + 1}]
if {$ident == ""} {
putserv "NOTICE $nick :Error. Wrong syntax. Use $sbnc(trigger)sbnc password 'ident'."
return
} else {
putquick "SBNC RESETPASS $ident $password"
putquick "NOTICE $nick :Done. New password for user ($ident) created."
putquick "NOTICE $nick :Password: $password"
}
}
"admin" {
set ident [lindex [split $arg] 1]
if {$ident == "$sbnc(ident)"} {
putquick "NOTICE $nick :Error. This ident is already an admin."
return
} elseif {$ident == ""} {
putserv "NOTICE $nick :Error. Wrong syntax. Use $sbnc(trigger)sbnc admin 'ident'."
return
} else {
putquick "SBNC ADMIN $ident"
putquick "NOTICE $nick :Done. User ($ident) has now admin rights."
}
}
"unadmin" {
set ident [lindex [split $arg] 1]
if {$ident == "$sbnc(ident)"} {
putquick "NOTICE $nick :Error. This ident needs admin rights."
return
} elseif {$ident == ""} {
putserv "NOTICE $nick :Error. Wrong syntax. Use $sbnc(trigger)sbnc unadmin 'ident'."
return
} else {
putquick "SBNC UNADMIN $ident"
putquick "NOTICE $nick :Done. Admin rights for user ($ident) deleted."
}
}
"global" {
set arg [lrange [split $arg] 1 end]
if {$arg == ""} {
putserv "NOTICE $nick :Error. Wrong syntax. Use $sbnc(trigger)sbnc global 'message'."
return
} else {
putquick "SBNC GLOBAL $arg"
putquick "NOTICE $nick :Done. Global notice to all bouncer users transmitted."
}
}
"join" {
set sbnc(joinchan) "[lindex [split $arg] 1]"
if {$sbnc(joinchan) == ""} {
putserv "NOTICE $nick :Error. Wrong syntax. Use $sbnc(trigger)sbnc join 'channel'."
return
} elseif {[string first # $sbnc(joinchan)] != 0} {
putserv "NOTICE $nick :Error. The channel has to start with '#'."
return
} else {
putserv "SBNC tcl :foreach sbnc(user) \[bncuserlist\] {setctx \$sbnc(user) ; channel add $sbnc(joinchan)}"
putserv "NOTICE $nick :Done. All sBNC users joined $sbnc(joinchan)."
return
}
}
"part" {
set sbnc(partchan) "[lindex [split $arg] 1]"
if {$sbnc(partchan) == ""} {
putserv "NOTICE $nick :Error. Wrong syntax. Use $sbnc(trigger)sbnc part 'channel'."
return
} elseif {[string first # $sbnc(partchan)] != 0} {
putserv "NOTICE $nick :Error. The channel has to start with a '#'."
return
} else {
putserv "SBNC tcl :foreach sbnc(user) \[bncuserlist\] {setctx \$sbnc(user) ; channel remove $sbnc(partchan)}"
putserv "NOTICE $nick :Done. All sBNC users parted $sbnc(partchan)."
return
}
}
"help" {
putserv "NOTICE $nick :\037sBNC help\037:"
putserv "NOTICE $nick :Use $sbnc(trigger)sbnc add 'ident' 'realname' to add a bouncer."
putserv "NOTICE $nick :Use $sbnc(trigger)sbnc del 'ident' to delete a bouncer."
putserv "NOTICE $nick :Use $sbnc(trigger)sbnc password 'ident' to generate a new password."
putserv "NOTICE $nick :Use $sbnc(trigger)sbnc admin 'ident' to give admin rights."
putserv "NOTICE $nick :Use $sbnc(trigger)sbnc unadmin 'ident' to remove admin rights."
putserv "NOTICE $nick :Use $sbnc(trigger)sbnc global 'message' to send a global notice to all bouncer users."
putserv "NOTICE $nick :Use $sbnc(trigger)sbnc join 'chan' to join all sBNC user a specific channel."
putserv "NOTICE $nick :Use $sbnc(trigger)sbnc part 'chan' to part all sBNC user a specific channel."
putserv "NOTICE $nick :End of list."
}
"default" {
putserv "NOTICE $nick :Error. Use $sbnc(trigger)sbnc help to see a command overview."
}
}
}
thx to the man that can use some of his time to edit it
