| View previous topic :: View next topic |
| Author |
Message |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Sun Nov 05, 2006 8:25 pm Post subject: Adding Nick@Host to this line |
|
|
Ok I need help with this line..
| Code: |
set text [lrange [split $arg] 0 end]
|
I'm trying to get it to save Nick@Hostmask with file as well...
I did this:
| Code: |
set text ($uhost)[lrange [split $arg set by $uhost] 0 end]
|
That worked but it won't let me space ($uhost)<SPACE>)[lrange [split $arg set by $uhost] 0 end] otherwise it saves as Nick@HostText here.
I know uhost isn't what I want either, trying to make it say Nick@Host but when I use $nick@$host it does Nck@host@host .. 1 host would be enough.
Thanks |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sun Nov 05, 2006 8:33 pm Post subject: |
|
|
If your meaning you want Nickname!ident@some.tld.com
If your meaning Nickname@some.tld.com
| Code: | | $nick@[lindex [split $uhost @] 1] |
Otherwise please state more clearly what you mean. _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Sun Nov 05, 2006 8:40 pm Post subject: |
|
|
That worked...
But
| Code: |
set text $nick@[lindex [split $uhost @] 1][lrange [split $arg] 0 end]
|
anyway to make it space?
set text $nick@[lindex [split $uhost @] 1]SPACE-HERE[lrange [split $arg] 0 end]
I tried making it:
| Code: |
set text $nick@[lindex [split $uhost @] 1] [lrange [split $arg] 0 end]
|
with a space and I get error:
[19:36] Tcl error [addgreet]: wrong # args: should be "set varName ?newValue?" |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Sun Nov 05, 2006 9:37 pm Post subject: |
|
|
You have two parts for the variable, you need to make it into one string by putting the contents on the variables into ""
| Code: | | set text "$nick@[lindex [split $uhost @] 1] [lrange [split $arg] 0 end]" |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
cache Master
Joined: 10 Jan 2006 Posts: 306 Location: Mass
|
Posted: Sun Nov 05, 2006 9:40 pm Post subject: |
|
|
| oh thanks, works now. |
|
| Back to top |
|
 |
|