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.

On Connect/Reconnect Script

Old posts that have not been replied to for several years.
Locked
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

On Connect/Reconnect Script

Post by mcdarby »

Hi, I am fairly new to TCL Scripting and I'm looking to need a TCL Script that does the following with the eggdrop bot. Since I run the server that I have Eggy on, I am thinking of giving Eggy an o:line so that it can be in unlimited channels. What I want to have eggy doing on connect or reconnect if he crashed for some reason is to:

/msg NickServ IDENTIFY $botpass
/oper $botnick $botpass
/chghost $botnick botnick.morphforest.com
/chgident $botnick newbotnick
/mode $botnick +x

Then afterwards continue with joining the channels it sits in. Purpose of it is also to hide Eggy's IP from those that could ping flood it off. Any help would be appreciated.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

set botpass "something"

bind evnt - init-server my:connect

proc my:connect init-server {
  putserv "PRIVMSG NickServ :IDENTIFY $::botpass"
  putserv "OPER $::botnick $::botpass"
  putserv "SETHOST $::botnick.morphforest.com"
  putserv "SETIDENT newbotnick"
  putserv "MODE $::botnick +x"
}
Btw, the chghost and chgident are for changing other people host and ident and to change yours is sethost and setident.
Once the game is over, the king and the pawn go back in the same box.
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

Post by mcdarby »

caesar wrote:

Code: Select all

set botpass "something"

bind evnt - init-server my:connect

proc my:connect init-server {
  putserv "PRIVMSG NickServ :IDENTIFY $::botpass"
  putserv "OPER $::botnick $::botpass"
  putserv "SETHOST $::botnick.morphforest.com"
  putserv "SETIDENT newbotnick"
  putserv "MODE $::botnick +x"
}
Btw, the chghost and chgident are for changing other people host and ident and to change yours is sethost and setident.
Okay, I just checked my server and it does also have /SETHOST and /SETIDENT, but don't need to include the nick that is being changed in it. Also, when /SETHOST is being used, it also does +x with it so that the +x part isn't needed.

Anyway, is the last part [putserv "SETIDENT newbotnick"] or is it [putserv "SETIDENT $::newbotnick"] because I happen to notice that a "$::" is missing in that one line.

--
McDarby
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Yes I know that the sethost adds you the +x, also I know that I haven't added the $:: to the newbotnick because in your original request you've said: "/chgident $botnick newbotnick" so.. Anyway, I've added all the parts of what you asked because you've asked them to be there.
Once the game is over, the king and the pawn go back in the same box.
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

Post by mcdarby »

caesar wrote:Yes I know that the sethost adds you the +x, also I know that I haven't added the $:: to the newbotnick because in your original request you've said: "/chgident $botnick newbotnick" so.. Anyway, I've added all the parts of what you asked because you've asked them to be there.
Hi, I apologize for taking a long time to respond, but I got busy recently and then helping someone link up with my small irc network. Anyway, where in the eggdrop.conf file do I put this script so that I can try it.

Thanks,

Erik McDarby
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Put it at the end (generally safest), or put it in a separate file and add a "source blah.tcl" where you load your other scripts.
Locked