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 

Only one bot responds

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


Joined: 15 Mar 2015
Posts: 317

PostPosted: Wed Jun 08, 2016 10:54 pm    Post subject: Only one bot responds Reply with quote

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 Smile
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Jun 09, 2016 1:17 am    Post subject: Reply with quote

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 {![string equal -nocase $chan $channel_admin} return


I honestly suspect it's the 3rd option. Smile
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
juanamores
Master


Joined: 15 Mar 2015
Posts: 317

PostPosted: Thu Jun 09, 2016 3:50 am    Post subject: Reply with quote

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) Rolling Eyes

EDIT: I was told the network that may have been a momentary desynchronization and it was solved. Very Happy
_________________
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 Smile
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