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

Post by nml375 »

eXtremer wrote: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 ?
If your bots still misbehave after restarting them (not just a simple rehash), this would suggest that you've mixed up the config files and scripts.

There is also one other possibility, there are a few scripts out there that try to "help" the user by automatically loading any and all scripts present in the scripts-directory. Since you seem rather sure you got your configs and scripts in order, this might be worth investigating.

"Where is the data taken from?":
Well, basically from whatever scripts you've loaded. These data will persist in memory until your bot is killed or restarted. Once killed or restarted, it's solely up to the scripts to restore any old data, as the whole tcl-environment is wiped, and most modules unloaded (if killed the whole process is entirely wiped).
NML_375
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

Nor7on wrote: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:
This is what I'm trying to do, but can't manage to make both Bots to login in using their own LoginName!
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

nml375 wrote:
eXtremer wrote: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 ?
If your bots still misbehave after restarting them (not just a simple rehash), this would suggest that you've mixed up the config files and scripts.

There is also one other possibility, there are a few scripts out there that try to "help" the user by automatically loading any and all scripts present in the scripts-directory. Since you seem rather sure you got your configs and scripts in order, this might be worth investigating.

"Where is the data taken from?":
Well, basically from whatever scripts you've loaded. These data will persist in memory until your bot is killed or restarted. Once killed or restarted, it's solely up to the scripts to restore any old data, as the whole tcl-environment is wiped, and most modules unloaded (if killed the whole process is entirely wiped).
Here is a funny think:

1. I deleted the mc.services script.
2. Commented the source scripts/mc.irc_services
3. Both Bots are dead.
4. Starting the Second Bot
5. Think what ? It is authenticating to X, although the script is deleted and in .conf it is commented, it should not login to X, but it does, I really don't understand, wtf ? :)

Here are some Print Screen, not to think I'm crazy or somethin `like that:
Scripts:
Image

Conf:
Image
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Well, second image actually shows mc.irc_services_unika.tcl being loaded.
NML_375
User avatar
Nor7on
Op
Posts: 185
Joined: Sat Mar 03, 2007 8:05 am
Location: Spain - Barcelona
Contact:

Post by Nor7on »

hey dude.

try use this tcl for login.

Code: Select all

#set the nickname of ur .conf of ur eggdrop 1.
set onenick "nickofureggdrop1"
#
# Username & password of X of ur eggdrop 1
set xlogin_userone "myuser1"
set xlogin_passone "mypass1"

#set the nickname of ur .conf of ur eggdrop 2.
set twonick "nickofureggdrop2"
#
# Username & password of X of ur eggdrop 2
set xlogin_usertwo "myuser2"
set xlogin_passtwo "mypass2"

#

set init-server "xlogin_dologin"

proc xlogin_dologin {} {
global xlogin_usertwo xlogin_passtwo xlogin_userone xlogin_passone botnick twonick onenick
	if {($botnick == "$onenick")} { 
   puthelp "PRIVMSG X@channels.undernet.org :login $xlogin_userone $xlogin_passone"
      puthelp "MODE $botnick +x"
   }
	if {($botnick == "$twonick")} { 
   puthelp "PRIVMSG X@channels.undernet.org :login $xlogin_usertwo $xlogin_passtwo"
      puthelp "MODE $botnick +x"
	}
}

putlog "Loaded X Login TCL for Two eggdrop."
no tested.
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

nml375 wrote:Well, second image actually shows mc.irc_services_unika.tcl being loaded.
No, this image was made before, I deleted & commented mc.services.
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

Nor7on wrote:hey dude.

try use this tcl for login.

Code: Select all

#set the nickname of ur .conf of ur eggdrop 1.
set onenick "nickofureggdrop1"
#
# Username & password of X of ur eggdrop 1
set xlogin_userone "myuser1"
set xlogin_passone "mypass1"

#set the nickname of ur .conf of ur eggdrop 2.
set twonick "nickofureggdrop2"
#
# Username & password of X of ur eggdrop 2
set xlogin_usertwo "myuser2"
set xlogin_passtwo "mypass2"

#

set init-server "xlogin_dologin"

proc xlogin_dologin {} {
global xlogin_usertwo xlogin_passtwo xlogin_userone xlogin_passone botnick twonick onenick
	if {($botnick == "$onenick")} { 
   puthelp "PRIVMSG X@channels.undernet.org :login $xlogin_userone $xlogin_passone"
      puthelp "MODE $botnick +x"
   }
	if {($botnick == "$twonick")} { 
   puthelp "PRIVMSG X@channels.undernet.org :login $xlogin_usertwo $xlogin_passtwo"
      puthelp "MODE $botnick +x"
	}
}

putlog "Loaded X Login TCL for Two eggdrop."
no tested.
10x Nor7on but I don't need it, still the bot will load mc.service and damn if I knew why and how :)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Only remaining option then (as stated earlier), would be that one of your scripts is loading all scripts within the scripts-directory. Figure out which, and see what's needed to make it stop...
NML_375
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

nml375 wrote:Only remaining option then (as stated earlier), would be that one of your scripts is loading all scripts within the scripts-directory. Figure out which, and see what's needed to make it stop...
nml375 you where right, I've commented this lines:

#source scripts/mc.topic_resynch.tcl
#source scripts/mettwursts_lagcheck_v1.8.tcl
#source scripts/multigreet1.3.tcl
#source scripts/sap.idle_control.tcl
#source scripts/world_time.tcl
#source scripts/xstuff.tcl

...and the bot worked just fine.
Now I have to find out what script, but I think I know what script is messing up things, is the "mc.topic_resynch.tcl", I'll check right now !
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

Ha, NO, the xstuff.tcl was the problem, in the tcl I put the login and pass so the Bot could unban itself when banned...and keep the Bot logged to X.
Now I'll try to link the Bots...
Thanks a lot nml375 for your help & advices Image
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

[19:05] Linked to Bo1(Hub).
*** Linked to Bo1
[19:05] User file rejected by Bot2: I have you marked for Aggressive sharing
[19:06] User file rejected by Bot2: I have you marked for Aggressive sharing.
[19:07] User file rejected by Bot2: I have you marked for Aggressive sharing.
[19:08] User file rejected by Bot2: I have you marked for Aggressive sharing.
[19:09] User file rejected by Bot2: I have you marked for Aggressive sharing.

[19:05] Linked to Bot2(leaf).
*** Linked to Bot2
[19:05] User file rejected by Bot1: I have you marked for Aggressive sharing.
[19:06] User file rejected by Bot1: I have you marked for Aggressive sharing.
[19:07] User file rejected by Bot1: I have you marked for Aggressive sharing.
[19:08] User file rejected by Bot1: I have you marked for Aggressive sharing.


What's wrong ?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

You've set the same flags for both bots...
Only one may be "agressive" (+s). Other bot should be "passive" (+p).
NML_375
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

nml375 wrote:You've set the same flags for both bots...
Only one may be "agressive" (+s). Other bot should be "passive" (+p).
hmmm here http://www.egghelp.org/enhance.htm is not said so.

.botattr Bot1 -p
You may not change the attributes of a directly linked bot.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Actually, it does say so...
Anyway, much simplified:

In hubbot:
Add leafbot as +s.
Optionally, you may also add +g (share all channels) and/or +l (bot is leaf, may not link any other bots to the botnet).

In leafbot:
Add hubbot as +ph.
Optionally, you may also add +g (share all channels).

Also, in order to alter bot attributes, you'll have to temporarily unlink them using the .unlink command.
NML_375
e
eXtremer
Op
Posts: 138
Joined: Wed May 07, 2008 5:33 am

Post by eXtremer »

nml375 wrote:Actually, it does say so...
Anyway, much simplified:

In hubbot:
Add leafbot as +s.
Optionally, you may also add +g (share all channels) and/or +l (bot is leaf, may not link any other bots to the botnet).

In leafbot:
Add hubbot as +ph.
Optionally, you may also add +g (share all channels).

Also, in order to alter bot attributes, you'll have to temporarily unlink them using the .unlink command.
Thanks again ;)

[19:52] Received challenge from Bot1... sending response ...
[19:52] Linked to Bot1.
*** Linked to Bot1
[19:52] Downloading user file from Bot1
[20:00] Ping timeout: Bot1
*** Ping timeout: Bot1 (lost 1 bot and 1 user)
[20:00] (Userlist download aborted.)

*** Quits: Bot1 (~Bot1@Bot1.users.undernet.org) (Ping timeout)
mdaaa :(
Post Reply