| View previous topic :: View next topic |
| Author |
Message |
neo42 Voice
Joined: 19 Jul 2006 Posts: 5 Location: Alabama
|
Posted: Thu Jul 20, 2006 12:09 am Post subject: Detecting a users umodes (not flags) in a tcl |
|
|
I'd like for my "doorkeeper" script to kick/ban a user whose nick is not registered or has expired. I know that umodes like +o and +v are handled by isop(), isvoice(), etc... Is there a way to get/parse a user's umodes to determine if other modes (+r in this instance) are set? I've checked FAQ's, searched, done my homework... can't find reference to this anywhere. Ideas anybody? _________________ --------------------------------------------
Neo42
NetAdmin, StrandedIRC
irc://irc.strandedirc.com:7000
Come join us on the #island, mon!
ethercrash@yahoo.com |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Thu Jul 20, 2006 4:49 am Post subject: |
|
|
You will have to relay on the raw reply from whois to contain "blabla is a registered nick" or use a "MODE blabla" and bind RAW MODE to see if it replys something about +r (or +R, depending on ircd). _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
neo42 Voice
Joined: 19 Jul 2006 Posts: 5 Location: Alabama
|
Posted: Fri Jul 21, 2006 3:27 pm Post subject: |
|
|
That's kinda what I thought... I had tried a couple things along that line, but nothing has worked yet. I'll dig up what I tried and post the code in a bit. Thanks for the reply. _________________ --------------------------------------------
Neo42
NetAdmin, StrandedIRC
irc://irc.strandedirc.com:7000
Come join us on the #island, mon!
ethercrash@yahoo.com |
|
| Back to top |
|
 |
neo42 Voice
Joined: 19 Jul 2006 Posts: 5 Location: Alabama
|
Posted: Fri Jul 21, 2006 6:44 pm Post subject: |
|
|
OK here goes... This is the script as it currently exists. It properly executes the whois, but seems to do nothing with the 379 numeric, which on Unreal Ircd is REPL_WHOISMODES. I can get the mode string with mIRC, so I know the reply is being made.
| Code: |
setudef flag sentry # channel must have +sentry
bind raw - 379 test:whois
bind join * *!*@* exec:whois
proc test:whois { from keyword text } {
putquick "PRIVMSG #mychan :$text" # just dump reply into chan
}
proc exec:whois {nick uhost handle chan} {
set chan [string tolower $chan]
if {[channel get $chan sentry]} {
putserv "whois $nick"
}
}
putlog "gatekeeper.tcl has been loaded successfully. (c)Neo42"
|
_________________ --------------------------------------------
Neo42
NetAdmin, StrandedIRC
irc://irc.strandedirc.com:7000
Come join us on the #island, mon!
ethercrash@yahoo.com |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Sat Jul 22, 2006 7:14 am Post subject: |
|
|
as "De_Kus2" made "WHOIS De_Kus":
| Quote: | | :irc.shockerz.net 307 De_Kus2 De_Kus :has identified for this nick |
_________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
neo42 Voice
Joined: 19 Jul 2006 Posts: 5 Location: Alabama
|
Posted: Sat Jul 22, 2006 8:20 am Post subject: |
|
|
Yep. I know about 307. Trick is, I want something to happen when a user is not registered. Not as easy as trapping the 307. It should be simple to take the reply from 379, split it, and check for "r" in the umode string, but for some reason the bot isn't getting the 379 response. _________________ --------------------------------------------
Neo42
NetAdmin, StrandedIRC
irc://irc.strandedirc.com:7000
Come join us on the #island, mon!
ethercrash@yahoo.com |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Jul 22, 2006 9:09 am Post subject: |
|
|
| neo42 wrote: | | Yep. I know about 307. Trick is, I want something to happen when a user is not registered. |
then catch the "End of /WHOIS List" numeric reply
if you still haven't received 307 upon receiving EOW, the nick is not registered (needless to say, you need to maintain track of nicks you inquired about by sending WHOIS; this is commonly done using Tcl's associative arrays) _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
|