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 

Help with scan variable [solved]

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


Joined: 18 Apr 2005
Posts: 49
Location: Germany

PostPosted: Fri Aug 25, 2006 10:34 am    Post subject: Help with scan variable [solved] Reply with quote

Hi,

how to split Hostname[IP] in two variables?

I think string trimright, but dunno how to use.

Quote:

*** Global -- from anystupidnet.com: Server hub.anystupidnet.com[123.456.789.0] closed the connection


Code:

bind raw - NOTICE hubsplit_snotc
proc hubsplit_snotc {from keyword text} {
set variable_all "[lindex [split $text] 6]"
set variable_hostname "......"
set variable_IP "......"
...


Regards tessa


Last edited by tessa1 on Thu Aug 31, 2006 11:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Fri Aug 25, 2006 11:49 am    Post subject: Reply with quote

Code:

set hostip [lindex [split $text] 6]
scan $hostip {%[^[][%[^]]} host ip

_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
tessa1
Halfop


Joined: 18 Apr 2005
Posts: 49
Location: Germany

PostPosted: Fri Aug 25, 2006 11:59 am    Post subject: Reply with quote

thats the way Very Happy

Thx
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 -> 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