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 

[SOLVED] Need help with string matching from getchanhost

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
LoKii
Voice


Joined: 21 Oct 2009
Posts: 34

PostPosted: Thu Mar 07, 2013 4:55 am    Post subject: [SOLVED] Need help with string matching from getchanhost Reply with quote

Hello everyone.

I would like to understand how to get only a part of the getchanhost pattern to be matched against a variable.

With getchanhost I get ident@hostmask. I need to filter out ONLY the hostmask. And ideas what I am looking for to help me accomplish this?

Cheers.


Nevermind, I found the easiest solution. Guess its not good to script at 9am without coffee.

The solution I used is to put the hostmask in the bind propery for join.

Cheers.
Back to top
View user's profile Send private message
dirty
Halfop


Joined: 08 Feb 2013
Posts: 40
Location: Romania

PostPosted: Thu Mar 07, 2013 5:44 am    Post subject: Reply with quote

or you could split the host and get ident and host/ip and then you can use a string match against the host and what your trying to match.

[split ident@host.name @] would get you ident host.name
[string match -nocase *!*@host.name *!*@other.host.name] would get you 1 or 0 if it matched or not

this could be useful if your trying to match multiple hosts and you won`t need to make more then 1 bind join
_________________
come to the dark side.. I have cookies!
WwW.BotZone.TK
Back to top
View user's profile Send private message Visit poster's website
LoKii
Voice


Joined: 21 Oct 2009
Posts: 34

PostPosted: Thu Mar 07, 2013 8:56 am    Post subject: Reply with quote

thank you dirty, you just made my day, as this is very usefull for other parts of my script. Basicly you helped me to finally understand how to use split correctly. I didnt fully understand it from the help/tut sites, but the way you put it got to me Wink

Cheers
Back to top
View user's profile Send private message
dirty
Halfop


Joined: 08 Feb 2013
Posts: 40
Location: Romania

PostPosted: Thu Mar 07, 2013 12:39 pm    Post subject: Reply with quote

glad i could help. Smile enjoy!
_________________
come to the dark side.. I have cookies!
WwW.BotZone.TK
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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