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 

Adding Nick@Host to this line

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


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Sun Nov 05, 2006 8:25 pm    Post subject: Adding Nick@Host to this line Reply with quote

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
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sun Nov 05, 2006 8:33 pm    Post subject: Reply with quote

If your meaning you want Nickname!ident@some.tld.com

Code:
$nick!$uhost


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
View user's profile Send private message MSN Messenger
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Sun Nov 05, 2006 8:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sun Nov 05, 2006 9:37 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Sun Nov 05, 2006 9:40 pm    Post subject: Reply with quote

oh thanks, works now.
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