| View previous topic :: View next topic |
| Author |
Message |
tessa1 Halfop
Joined: 18 Apr 2005 Posts: 49 Location: Germany
|
Posted: Fri Aug 25, 2006 10:34 am Post subject: Help with scan variable [solved] |
|
|
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 |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Fri Aug 25, 2006 11:49 am Post subject: |
|
|
| 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 |
|
 |
tessa1 Halfop
Joined: 18 Apr 2005 Posts: 49 Location: Germany
|
Posted: Fri Aug 25, 2006 11:59 am Post subject: |
|
|
thats the way
Thx |
|
| Back to top |
|
 |
|