im running an eggdrop on my nix box but problem is that my isp blocks ident port 113 so my bot cannot ident. on undernet they ask a user to basicly auth themselves by askin users to type something. it goes something like this...
type /quote pass randomnumbershere to connect
in mirc i do fix his with
on *:snotice:*quote*pass*:{
noop $regex($1-,/quote\spass\s(\S+)/i)
quote PASS $regml(1)
}
bind evnt - connect-server passbind
bind evnt - init-server passunbind
proc passbind x {
bind raw - NOTICE passnotice
}
proc passunbind x {
unbind raw - NOTICE passnotice
}
proc passnotice {f k a} {
if {$f==""&&[string match "AUTH */QUOTE PASS *" $a]} {
putquick "PASS [lindex [split $a] end]"
}
}
(the extra code is to prevent it from being exploited/wasting resources like the mirc thing appears to be vulnerable to/do.)
EDIT: I guess I should have reloaded the page after writing the code to prevent this redundant post
Guppy's script seems to do pretty much the same thing...except that it will run a regexp on ALL notices recieved during the connection process and (try to) remove the (possibly nonexistant) bind when you disconnect (which is not needed IMO)
Very close user... missing the disconnect bind incase the bot gets it wrong though ;x
Download the quotepass.tcl at tclscript.com, or download the latest cvs of eggdrop, it is included and automatically loaded depending on your net-type.
Edit for edit: Yours will run the comparison on all server notices as well during connection, I don't suspect regular users (read as: none) will be noticing connecting clients in any event, since they have no idea who is connecting.
Edit 2: I see what you mean, after entering the password, all notices after that could be avoided from processing by unbinding at that point.
Last edited by strikelight on Mon Apr 07, 2008 9:39 pm, edited 1 time in total.
strikelight wrote:missing the disconnect bind incase the bot gets it wrong though
I don't see why it needs to be removed...it will be created again when the bot tries to reconnect, and creating the same bind several times (like my script would do in that case) should not cause any problems.
strikelight wrote:Yours will run the comparison on all server notices as well during connection
Yes...the $f=="" check might be a waste of cpu (the notices from the server during connect (not NOTICE AUTH) might happen after "init-server" - I don't remember), but string match is cheaper than regexp
user wrote:but string match is cheaper than regexp
Yes, we discussed that and tested it thoroughly... nothing of significance...
We decided on regexp as it lends itself more to the application of this system, incase the wording changes or what not.
strikelight wrote:However, it will leave a needless bind in memory if never-give-up is set to 0.
The disconnect-server bind is doing that job in your version. You should unbind the disconnect-server bind in the init-server code and get rid of that pesky "catch"
If we had a hair splitting forum, I would split this thread and move the last part there
strikelight wrote:However, it will leave a needless bind in memory if never-give-up is set to 0.
The disconnect-server bind is doing that job in your version. You should unbind the disconnect-server bind in the init-server code and get rid of that pesky "catch"
If we had a hair splitting forum, I would split this thread and move the last part there
Haha, true enough about the disconnect-bind...
As for the catch, double unbind'ing can result in errors, and while it shouldn't happen, just making sure.
Perhaps guppy has a better reason than I can recall for the disconnect-server bind.
thanks alot guys i really appreciate it. while i got you here know of any X service scripts that randomly check hostname to see if thier logged in and login if not.. this comes to deal with Unets total lack of stability and if you get disconnected it will see you as still logged in by the time you reconnect thgus preventing a login