| View previous topic :: View next topic |
| Author |
Message |
Gust Voice
Joined: 28 Jun 2006 Posts: 15
|
Posted: Wed Jun 28, 2006 12:58 pm Post subject: getchanhost |
|
|
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:
Somebody know how to fix that?
Thanks! |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Wed Jun 28, 2006 1:15 pm Post subject: |
|
|
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 |
|
 |
Gust Voice
Joined: 28 Jun 2006 Posts: 15
|
Posted: Wed Jun 28, 2006 1:31 pm Post subject: |
|
|
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 |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Wed Jun 28, 2006 1:40 pm Post subject: |
|
|
There is no more information, everything can be assumed .
- 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 |
|
 |
Gust Voice
Joined: 28 Jun 2006 Posts: 15
|
Posted: Wed Jun 28, 2006 1:49 pm Post subject: |
|
|
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 |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Wed Jun 28, 2006 2:03 pm Post subject: |
|
|
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 |
|
 |
Gust Voice
Joined: 28 Jun 2006 Posts: 15
|
Posted: Wed Jun 28, 2006 2:24 pm Post subject: |
|
|
Yups, still "*!*"
No error, and the user is on the channel...
It works when the bot is only on 1 channel... |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Thu Jun 29, 2006 2:40 am Post subject: |
|
|
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 |
|
 |
|