This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Two Bots to use same userlist and chanlist file

General support and discussion of Eggdrop bots.
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Two Bots to use same userlist and chanlist file

Post by eXtremer »

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 ?
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

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: Select all

*** 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: Select all

[10:03] No longer ignoring *!*@Bot1.users.undernet.org (expired)
What does this mean ?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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: Select all

[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
M
Moonster
Halfop
Posts: 95
Joined: Wed Nov 13, 2002 5:39 pm
Location: Manchester NH USA
Contact:

Post by Moonster »

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 :P

Only supposed to use one Username per ident@iprange as far as I know.
"Knowledge is Power"
BeastNH/Moonster on Undernet/EFnet IRC Network
B
Bahasa
Voice
Posts: 19
Joined: Sun Jul 27, 2008 11:22 am
Contact:

Post by Bahasa »

using .chanset #channelname +/-weather ?
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

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: Select all

[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.
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

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 :P

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..
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

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!
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

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 :))

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 :)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

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 :) 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..
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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 :) 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
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

nml375 wrote:
eXtremer wrote:
nml375 wrote: 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 :)
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 :) 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 ;)
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

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 ?
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

Post by Nor7on »

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:
Post Reply