egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

code help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
.pt
Halfop


Joined: 16 Nov 2005
Posts: 71

PostPosted: Fri Feb 22, 2008 4:55 am    Post subject: code help Reply with quote

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 Smile
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri Feb 22, 2008 9:53 am    Post subject: Re: code help Reply with quote

.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 Smile
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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Feb 22, 2008 2:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber