sbnc script

Paste Your code(s) here, and state your problem.

sbnc script

Postby laffen » Sat Aug 09, 2008 5:33 pm

Hi

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 :)
laffen
 

Re: sbnc script

Postby Lukemob » Fri Aug 15, 2008 6:09 pm

I'm sure I added the simul function to it. And I think it was just right for you...

Luckily I've not deleted the edited version, I've not tried it, if you find any errors, report here pls.

sBNC script:
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) - Edited by Lukemob to add SIMUL command"

    #  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
                    }
                }
            "simul" {
               if {[lindex $arg 1] != ""} {
                  set ident "[lindex $arg 1]"
                  if {[lindex $arg 2] != ""} {
                     set cmd "[lrange $arg 2 end]"
                     putquick "SBNC SIMUL $ident $cmd"
                     putserv "notice $nick :Done."
                  } else {
                     putquick "notice $nick :Error. Wrong syntax. Use $sbnc(trigger)sbnc simul ident \002command\002"
                  }
               } else {
                  putquick "notice $nick :Error. Wrong syntax. Use: $sbnc(trigger)sbnc simul \002ident\002 command"
               }
            }
                "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."
                }
            }
        }
Lukemob
 

Re: sbnc script

Postby Futz0r » Sun Apr 19, 2009 4:56 pm

Code: Select all
"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
                    }
                }




Code: Select all
[18:51:08 - 19:04:2009] (@Futz0r) $sbnc join #futz0r.dk
[18:51:08 - 19:04:2009] • Joins: shahr`bnc_ (shahr@zaxx.users.quakenet.org)
[18:51:09 - 19:04:2009] • Joins: svenson_ (svenson@is.sleeping.with.you-aimbot.info)
[18:51:09 - 19:04:2009] • Joins: CROCKET` (crocket@dont.whine.you-aimbot.info)
[18:51:09 - 19:04:2009] • Joins: arc`JhN (jhn@can.give.you-aimbot.info)
[18:51:09 - 19:04:2009] • Joins: creativE-`BNC_ (creative@dont.whine.you-aimbot.info)
[18:51:09 - 19:04:2009] • Joins: Fg|cz0r_ (csor@hate.you-aimbot.info)


i have this script, but i cant get all to join 1 channel, why ? only 6 bncs will join, and i have 40+ on my server..

and i cant see what problem its
Futz0r
 

Re: sbnc script

Postby jonlar » Wed Jun 03, 2009 1:23 pm

NO support to Idle shit

there is also a tcl command possible to get the bncs joined... but....
jonlar
 

Re: sbnc script

Postby russh3l » Sat Nov 20, 2010 11:05 pm

laffen wrote:


Hey friends

which I'll write to the file this script in the ftp ?
russh3l
 


Return to TCL Scripting Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron