This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

code help

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
.
.pt
Halfop
Posts: 71
Joined: Wed Nov 16, 2005 10:14 am

code help

Post by .pt »

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 :)
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Re: code help

Post by DragnLord »

.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: Select all

if {$uhost != "sucker@microsoft.com" && $person != $botnick} { putserv "WHOIS $person $person" }
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
Post Reply