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 

getchanhost

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


Joined: 28 Jun 2006
Posts: 15

PostPosted: Wed Jun 28, 2006 12:58 pm    Post subject: getchanhost Reply with quote

Hi,

i am using the following code in my script:
Code:
bind pub o|o !ident ident_script

proc ident_script { nick uhost hand chan arg } {
   set txt [split $arg]
   set player [lindex $txt 0]
   append ident "*!*" [getchanhost $player $chan]
   puthelp "PRIVMSG $chan :$ident"
}


It's a stupid script i wrote, because i had some problems with an invite script that also uses getchanhost...

But I discovered that the script above only works good if my eggdrop is only on 1 channel... If I try the script when my eggdrop is on multiple channels, the bot output is:
Code:
*!*


Somebody know how to fix that?

Thanks!
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Jun 28, 2006 1:15 pm    Post subject: Reply with quote

Hint: the channel argument is optional.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Gust
Voice


Joined: 28 Jun 2006
Posts: 15

PostPosted: Wed Jun 28, 2006 1:31 pm    Post subject: Reply with quote

Could you give me some more information?

Because i am new to tcl-scripting, i don't really understand what you are trying to say...

Thanks!
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Jun 28, 2006 1:40 pm    Post subject: Reply with quote

There is no more information, everything can be assumed Razz.
- the topic/function I am talking about is 'getchanhost'
- the channel argument of course refers to '$chan'
- and optional means, you can remove it
- hint means: try and see what happens!
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Gust
Voice


Joined: 28 Jun 2006
Posts: 15

PostPosted: Wed Jun 28, 2006 1:49 pm    Post subject: Reply with quote

OK, tried to remove $chan argument, but still the same problem...

This is the script i've tried...

Code:
bind pub o|o !ident ident_script

proc ident_script { nick uhost hand chan arg } {
   set txt [split $arg]
   set player [lindex $txt 0]
   append ident "*!*" [getchanhost $player]
   puthelp "PRIVMSG $chan :$ident"
}
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Jun 28, 2006 2:03 pm    Post subject: Reply with quote

whats the result? still "*!*"? If its "*!*" there is no such nick on any channel the bot is on. Otherwise you would have found a bug in eggdrop which I cannot reproduce. Make sure there are no invisible characters involved (maybe use stripcodes?!).
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Gust
Voice


Joined: 28 Jun 2006
Posts: 15

PostPosted: Wed Jun 28, 2006 2:24 pm    Post subject: Reply with quote

Yups, still "*!*"

No error, and the user is on the channel...

It works when the bot is only on 1 channel...
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Thu Jun 29, 2006 2:40 am    Post subject: Reply with quote

check the channel records (.channel #chan in partyline), maybe the bot does not have proper host entries for one of the channels.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
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