| View previous topic :: View next topic |
| Author |
Message |
juanamores Master
Joined: 15 Mar 2015 Posts: 317
|
Posted: Wed Jun 08, 2016 10:54 pm Post subject: Only one bot responds |
|
|
I have 2 BOTs on my channel having the same TCL.
Until a few days ago both BOTs responded the same commands .
Today just one answers me.
What can be changed?
This only happens with this Tcl:
| Code: | bind pub n|n !restart restart_bot
bind pub n|n !rehash rehash_bot
bind pub n|n !reload reload_bot
bind pub nt|n !quits quit_bot
proc restart_bot {nick uhost hand chan text} {
global channel_admin
if { $chan != $channel_admin} { return 0 }
putserv "PRIVMSG $chan :Ok, restart...."
putlog "\002RESTART\002 requested by $nick"
utimer 1 restart
}
proc rehash_bot {nick uhost hand chan text} {
global channel_admin
if { $chan != channel_admin} { return 0 }
putserv "PRIVMSG $chan :Ok, rehash...."
putlog "\002Rehash\002 requested by $nick"
utimer 1 rehash
}
proc reload_bot {nick uhost hand chan text} {
global channel_admin
if { $chan != $channel_admin} { return 0 }
putserv "PRIVMSG $chan :Ok, reload...."
putlog "\002Reload\002 requested by $nick"
utimer 1 reload
}
proc quit_bot {nick uhost hand chan text} {
global channel_admin
if { $chan != $channel_admin} { return 0 }
putserv "PRIVMSG $chan :Ok, quit...."
putlog "\002QUIT\002 requested by $nick"
die "good bye!"
} |
_________________ If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks  |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Thu Jun 09, 2016 1:17 am Post subject: |
|
|
There are 3 options:
1. You don't have the right access (flags).
2. You issue the command on another channel than what is defined by channel_admin
3. This piece of code:
| Code: |
if { $chan != $channel_admin} { return 0 }
|
meaning let's say that channel_admin is defined to be #admin but the server tells the bot he is on #ADMIN channel then that comparison fails.
How to find the culprit?
1. From DCC Chat/Telnet with the bot do a .channel #channel_admin and see with what user name it sees you then do a .whois on that name and see if you have the required flags
2. Check the channel_admin variable and make sure you are on the same channel.
3. You better change that line with:
| Code: |
if { _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
juanamores Master
Joined: 15 Mar 2015 Posts: 317
|
Posted: Thu Jun 09, 2016 3:50 am Post subject: |
|
|
It is rare , but I saw what the problem was .
The BoT is not taking my virtual host.
It must be a network problem, I will consult...
The bot takes a random virtual ip given by the Network .
If I performed a /whois I see my virtual Ip (registered host by the Network), but the bot takes:
(Rxm@BeL8IV.BARG4B.virtual)
EDIT: I was told the network that may have been a momentary desynchronization and it was solved.  _________________ If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks  |
|
| Back to top |
|
 |
|