| View previous topic :: View next topic |
| Author |
Message |
.pt Halfop
Joined: 16 Nov 2005 Posts: 71
|
Posted: Fri Feb 22, 2008 4:55 am Post subject: code help |
|
|
cant someone modify this
if {$person != $botnick} { putserv "WHOIS $person $person" }
to also check if that person has some *!*@host not to whois that person
ty in advance  |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Fri Feb 22, 2008 9:53 am Post subject: Re: code help |
|
|
| .pt wrote: | cant someone modify this
if {$person != $botnick} { putserv "WHOIS $person $person" }
to also check if that person has some *!*@host not to whois that person
ty in advance  | Since you did not paste the whole proc, this may not work.
| Code: | | if {$uhost != "sucker@microsoft.com" && $person != $botnick} { putserv "WHOIS $person $person" } |
|
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Feb 22, 2008 2:41 pm Post subject: |
|
|
A few suggestions;
Instead of using $person != $botnick, considder using [isbotnick $person].
Instead of using $uhost != "sucker@microsoft.com", use string equal [-nocase] "sucker@microsoft.com" <userhost> for exact matching, or string match [-nocase] "*@microsoft.com" <userhost> for pattern matching. Replace <userhost> with the host to check (ie $uhost). use -nocase if you'd like the test to be case-insensitive (without the brackets).
Also, I find it abit unclear how to "combine" the two tests, should the whois-query be prevented if either test fails (nick is bot or host matches), or both (nick is bot and host matches). _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|