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 

Two Bots to use same userlist and chanlist file
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Fri Aug 01, 2008 2:33 am    Post subject: Two Bots to use same userlist and chanlist file Reply with quote

I configured one Bot on a server, now I want to add another one (Bot2.conf) the second Bot should use the same settings as the Bot1.
And for example in channel if a user will user the !weather cmd, I want only one Bot to answer not both, the one that will be fastest...
Is it possible to do this ?
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Fri Aug 01, 2008 3:03 am    Post subject: Reply with quote

mdah I've tested what I've said in my #1 post the bots connect every thing is fine except:

1. The second bot authetificates itself to X (ChanServ) with the same username as the first Bot, I don't want that, each Bot must have its own username. (Undernet allows 2 logins from the same host).
Code:
*** Joins: Bot1 (~Bot1@Bot2.users.undernet.org) - Clones from *!*@Bot2.users.undernet.org (Bot1 Bot2 [2])


P.S. I use the "mc.irc_services.tcl" script to authentificate to X (ChanServ), for the Bot1 I set in Bot.1 conf to load the mc.irc_services_Bot1.tcl and for the Bot2 the mc.irc_services_Bot2.tcl, but I don't know why Bot2 logins with the Bot1 username, why ?

2. Both Bots respond to the chan command, log:

<+eXtremer> !weather Helsinki
<@Bot1> Helsinki, Finland (60.3°N/25.0°E); Updated: 9:56 AM EEST (August 01, 2008); Conditions: Mostly Cloudy; Temperature: 69.1°F (20.6°C); High/Low: 77/50°F (25/10°C); UV: 2/16; Humidity: 76%; Dew Point: 61°F (16°C); Pressure: 29.88 in/1011.7 hPa; Wind: Calm
<@Bot2> Helsinki, Finland (60.3°N/25.0°E); Updated: 9:56 AM EEST (August 01, 2008); Conditions: Mostly Cloudy; Temperature: 69.1°F (20.6°C); High/Low: 77/50°F (25/10°C); UV: 2/16; Humidity: 76%; Dew Point: 61°F (16°C); Pressure: 29.88 in/1011.7 hPa; Wind: Calm

...I want just One Bot to answer the fastest (NO lag), it creates flood on chan if both answer.

I think there is nothing to do with the response of the both Bots except not loading the weather and other scripts on the second Bot.

In partyline of the Second Bot (Bot2) I saw this :

Code:
[10:03] No longer ignoring *!*@Bot1.users.undernet.org (expired)


What does this mean ?
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Aug 01, 2008 10:11 am    Post subject: Reply with quote

Simply create a second copy of the initial config, and edit it accordingly.

1. I'd suggest you double check which files are loaded on each bot. Seems to me they're actually using the same copy of mc.irc_services.tcl, or the two copies holds the exact same information

2. Only activate the trigger in one bot. If you've got both bots linked in a botnet, it may be possible to rewrite the script to try and sync responses over the botnet. I would not consider this a trivial rewrite however.

Code:
[10:03] No longer ignoring *!*@Bot1.users.undernet.org (expired)

This simply means that Bot2 stopped ignoring bot1. Most likely, it thought bot1 flooded earlier, and placed it on ignore...

On a side note, with respect to your topic, I do hope you are using two separate user files for both bots?[/quote]
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Moonster
Halfop


Joined: 13 Nov 2002
Posts: 95
Location: Manchester NH USA

PostPosted: Sat Aug 02, 2008 6:10 am    Post subject: Reply with quote

If your using two bots from one IP address with two Undernet Usernames they will both get killed (the Usernames) if someone from usernames does their job and scans Razz

Only supposed to use one Username per ident@iprange as far as I know.
_________________
"Knowledge is Power"
BeastNH/Moonster on Undernet/EFnet IRC Network
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bahasa
Voice


Joined: 27 Jul 2008
Posts: 19

PostPosted: Sun Aug 03, 2008 12:29 am    Post subject: Reply with quote

using .chanset #channelname +/-weather ?
_________________
Bahasa Indonesia
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Wed Aug 06, 2008 7:36 am    Post subject: Reply with quote

nml375 wrote:
Simply create a second copy of the initial config, and edit it accordingly.

1. I'd suggest you double check which files are loaded on each bot. Seems to me they're actually using the same copy of mc.irc_services.tcl, or the two copies holds the exact same information

2. Only activate the trigger in one bot. If you've got both bots linked in a botnet, it may be possible to rewrite the script to try and sync responses over the botnet. I would not consider this a trivial rewrite however.

Code:
[10:03] No longer ignoring *!*@Bot1.users.undernet.org (expired)

This simply means that Bot2 stopped ignoring bot1. Most likely, it thought bot1 flooded earlier, and placed it on ignore...

On a side note, with respect to your topic, I do hope you are using two separate user files for both bots?
[/quote]

I did so, I made a copy of Bot1.conf and changed
the m.irc_services.tcl to m.irc_services_Bo2.tcl,
the listen port,
the Botnick and ident.

I understand that the Bot2 stopped ignoring Bot1, bot why it ignored it at all ? was flooded or what ?

Once again I say, both bots use their own *.conf file, but have the same chan and user file.
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Wed Aug 06, 2008 7:37 am    Post subject: Reply with quote

Moonster wrote:
If your using two bots from one IP address with two Undernet Usernames they will both get killed (the Usernames) if someone from usernames does their job and scans Razz

Only supposed to use one Username per ident@iprange as far as I know.


NO, the bot will not be killed don't worry, I'm not on Undernet for 2 days..
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Wed Aug 06, 2008 7:39 am    Post subject: Reply with quote

Bahasa wrote:
using .chanset #channelname +/-weather ?


You understand that if I .chanset #chan -weather on Bot1, the weather script will be automaticly disabled on Bot2 too, cose it uses the same channel and user file!
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Wed Aug 06, 2008 7:43 am    Post subject: Reply with quote

LOL
Today after being away (Not online) for a few days I've noticed that Bot1 uses the Bot2 username AND the Bot2 uses the Bot1 username Smile)

Something like that:

Bot1 => zzzzz (~zzzzz@AAAAAA.users.undernet.org)
Bot2 => aaaaa (~aaaaa@ZZZZZZ.users.undernet.org)

but should be:

Bot1 => zzzzz (~zzzzz@ZZZZZZ.users.undernet.org)
Bot2 => aaaaa (~aaaaa@AAAAAA.users.undernet.org)

I really don't understand why Smile
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Aug 06, 2008 7:45 am    Post subject: Reply with quote

eXtremer wrote:
I understand that the Bot2 stopped ignoring Bot1, bot why it ignored it at all ? was flooded or what ?

Yup, unless someone used the .+ignore command. But most likely, it was ignored due to flooding.

eXtremer wrote:
Once again I say, both bots use their own *.conf file, but have the same chan and user file.

I would strongly recommend not using the same user and channels file with both bots. If you wish to share user settings, link the two bots and set up sharing properly instead.


As for your issue with bot2 using bot1's login-credentials with X, either you did something wrong when editing the different scripts, or both config files load the same script.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Wed Aug 06, 2008 8:11 am    Post subject: Reply with quote

nml375 wrote:
eXtremer wrote:
I understand that the Bot2 stopped ignoring Bot1, bot why it ignored it at all ? was flooded or what ?

Yup, unless someone used the .+ignore command. But most likely, it was ignored due to flooding.


No one has acc to partyline except me, so the .+ignore was not used, interesting why and how the Bot1 flooded Bot2...

nml375 wrote:
eXtremer wrote:
Once again I say, both bots use their own *.conf file, but have the same chan and user file.

I would strongly recommend not using the same user and channels file with both bots. If you wish to share user settings, link the two bots and set up sharing properly instead.


I really don't want to mess with linking the Bots, It will give me headaches, I saw once two Bots linked that at almost every command gave me the "Sorry busy, transfering files" and the Owner of the bots just gave up & unlinked them. But why to link them ? they work perfectly as it is..


nml375 wrote:
As for your issue with bot2 using bot1's login-credentials with X, either you did something wrong when editing the different scripts, or both config files load the same script.


I'm really not blind Smile I already looked in the bots .conf files several times, and they use different mc.irc_services.tcl script, maybe it is because of the cache or the user.file, I really don't know..
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Aug 06, 2008 8:38 am    Post subject: Reply with quote

eXtremer wrote:
nml375 wrote:
eXtremer wrote:
I understand that the Bot2 stopped ignoring Bot1, bot why it ignored it at all ? was flooded or what ?

Yup, unless someone used the .+ignore command. But most likely, it was ignored due to flooding.


No one has acc to partyline except me, so the .+ignore was not used, interesting why and how the Bot1 flooded Bot2...

Could be that weather script flood you mentioned earlier?

eXtremer wrote:
nml375 wrote:
eXtremer wrote:
Once again I say, both bots use their own *.conf file, but have the same chan and user file.

I would strongly recommend not using the same user and channels file with both bots. If you wish to share user settings, link the two bots and set up sharing properly instead.


I really don't want to mess with linking the Bots, It will give me headaches, I saw once two Bots linked that at almost every command gave me the "Sorry busy, transfering files" and the Owner of the bots just gave up & unlinked them. But why to link them ? they work perfectly as it is..

The problem is, that your two bots are having a "race condition" as to who gets to write to the userfile. This could lead to some very odd results whenever the data stored in the userfile is altered. That would include when bans, ignores, etc are placed and/or removed.

As for those issues you are describing with linking bots, personally, I've never had such restrictive issues. Actually, I can't even find such a message within eggdrop's source or language files.
Getting flags and bot records correct the first time may be a slight hazzle, but once that's done you'll never have any issues with syncing users in both bots.

eXtremer wrote:
nml375 wrote:
As for your issue with bot2 using bot1's login-credentials with X, either you did something wrong when editing the different scripts, or both config files load the same script.


I'm really not blind Smile I already looked in the bots .conf files several times, and they use different mc.irc_services.tcl script, maybe it is because of the cache or the user.file, I really don't know..


  • There is no script cache...
  • There is no cache stored on disk whatsoever...
  • Scripts must not access the userfile directly. They may only use commands to add, alter, and remove user records, bans, ignores, etc.
  • mc.irc_services.tcl does not store any data in any user record or other data entity present in the userfile.

Look again, look more throughout, look yet again, go get a friend to have a good look... Not to be rude, but you've screwed up somewhere in there. They use different config files, the different configs load different mc.irc_service.tcl copies, but are the different copies setup properly?
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Wed Aug 06, 2008 8:55 am    Post subject: Reply with quote

nml375 wrote:
eXtremer wrote:
nml375 wrote:
eXtremer wrote:
I understand that the Bot2 stopped ignoring Bot1, bot why it ignored it at all ? was flooded or what ?

Yup, unless someone used the .+ignore command. But most likely, it was ignored due to flooding.


No one has acc to partyline except me, so the .+ignore was not used, interesting why and how the Bot1 flooded Bot2...

Could be that weather script flood you mentioned earlier?


NO, I use many scripts, I just said weather script as example...

eXtremer wrote:
nml375 wrote:
eXtremer wrote:
Once again I say, both bots use their own *.conf file, but have the same chan and user file.

I would strongly recommend not using the same user and channels file with both bots. If you wish to share user settings, link the two bots and set up sharing properly instead.


I really don't want to mess with linking the Bots, It will give me headaches, I saw once two Bots linked that at almost every command gave me the "Sorry busy, transfering files" and the Owner of the bots just gave up & unlinked them. But why to link them ? they work perfectly as it is..

nml375 wrote:
The problem is, that your two bots are having a "race condition" as to who gets to write to the userfile. This could lead to some very odd results whenever the data stored in the userfile is altered. That would include when bans, ignores, etc are placed and/or removed.

As for those issues you are describing with linking bots, personally, I've never had such restrictive issues. Actually, I can't even find such a message within eggdrop's source or language files.
Getting flags and bot records correct the first time may be a slight hazzle, but once that's done you'll never have any issues with syncing users in both bots.


Noop, I don't think I need to link...maybe later when I'll not be lazy Smile

eXtremer wrote:
nml375 wrote:
As for your issue with bot2 using bot1's login-credentials with X, either you did something wrong when editing the different scripts, or both config files load the same script.


I'm really not blind Smile I already looked in the bots .conf files several times, and they use different mc.irc_services.tcl script, maybe it is because of the cache or the user.file, I really don't know..

  • There is no script cache...
  • There is no cache stored on disk whatsoever...
  • Scripts must not access the userfile directly. They may only use commands to add, alter, and remove user records, bans, ignores, etc.
  • mc.irc_services.tcl does not store any data in any user record or other data entity present in the userfile.

Look again, look more throughout, look yet again, go get a friend to have a good look... Not to be rude, but you've screwed up somewhere in there. They use different config files, the different configs load different mc.irc_service.tcl copies, but are the different copies setup properly?


I already looked, a few seconds ago I logged on my server and checked again...anyway it's not a big problem, I'll lived as it is.
Thanks nml375 Wink
Back to top
View user's profile Send private message
eXtremer
Op


Joined: 07 May 2008
Posts: 138

PostPosted: Mon Aug 18, 2008 9:15 am    Post subject: Reply with quote

pfff I really don't understand whats wrong with my Bot, the second Bot still is loging on with the First Username, now I've removed mc.irc_services.tcl script from /scripts and guess what ? THE BOT2 is still loging on with the first Username, wtf ?

The whole situation:

I have 2 bots with 2 .conf file, now it uses different user and chan file, both Bots use mc.irc_services.tcl script to Authenticate to ChanServ (X), I've made a second mc.irc_services.tcl renamed to mc.irc_services2.tcl for the second Bot. In the .conf of the Second bot I've changed to load mc.irc_services2.tcl but still the second Bots keeps on loging on with the Username dedicated for the First Bot, why ??? Now I've deleted (made a backup) of the mc.irc_services.tcl from /scripts but still the second bot is loging on with the First Username, now I commented (#source scripts/mc.irc_services2.tcl
) but again nothin` changed, where from the bot is taken the data ?
Back to top
View user's profile Send private message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Mon Aug 18, 2008 12:10 pm    Post subject: Reply with quote

better is create 1 .conf for every bot, and if u want sync.. all userlist, just link ur eggdrop's.

http://www.egghelp.org/enhance.htm

Wink
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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