| View previous topic :: View next topic |
| Author |
Message |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Wed Feb 01, 2006 1:06 am Post subject: |
|
|
| *bump*? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Feb 03, 2006 1:24 pm Post subject: |
|
|
It's not that long, but can be tweaked a little bit.
| Code: | set password ""
bind raw - NOTICE notice_bnc
proc notice_bnc {from keyword arg} {
global password
if {[lindex [split [set arg [string tolower $arg]]] 0] == "auth" ||
[string tolower $from] == "my.server.here"} {
set bnc_notice [join [lrange [split $arg] 1 end]]
if {[string match "*type /pass password*" $bnc_notice]} {
putserv "PASS $password"
}
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Fri Feb 03, 2006 9:02 pm Post subject: |
|
|
thanks
i was hoping to use the raw for this though.
now, im a 100% newb at tcl, and haven't even tried to code with it before now.
but i made a naive attempt
i dont have the ability to test it atm though
think this will work?
| Code: | set nickpass "password"
bind raw - 512 identify:nick
proc identify:nick {from key arg} {
putserv "PASS $nickpass"
} |
i dont want to take any other factors into account, not nickname, server, etc
just in all cases, when the bot gets raw 512, do /pass password |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Feb 04, 2006 9:07 am Post subject: |
|
|
I don't see why it shouldn't work, gets raw 512 and identifies. You can do some tests by adding a line:
| Code: | | putlog "$from :: $key :: $arg" |
to know what id being sent and match upon that (if you want to take anything into consideration). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Sat Feb 04, 2006 3:06 pm Post subject: |
|
|
ok i tested that, it actually sent the nickpass, but i got an error with it
| Code: | [13:57] chat.wiredreality.net :: 512 :: ChatBot :Authorization required to use Registered Nickname ChatBot
[13:57] Tcl error [identify:nick]: can't read "nickpass": no such variable
set errorInfo
Currently: can't read "nickpass": no such variable
Currently: while executing
Currently: "putserv "PASS $nickpass""
Currently: (procedure "identify:nick" line 2)
Currently: invoked from within
Currently: "identify:nick $_raw1 $_raw2 $_raw3" |
|
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Feb 04, 2006 6:27 pm Post subject: |
|
|
That because nickpass is not global in the proc. Either add
in the proc or use $::nickpass instead of $nickpass. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Sat Feb 04, 2006 9:09 pm Post subject: |
|
|
thanks
works perfect |
|
| Back to top |
|
 |
|