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.

How to make a bot oper?

Old posts that have not been replied to for several years.
Locked
User avatar
Moose
Voice
Posts: 37
Joined: Mon Aug 18, 2003 2:54 am
Location: Northamption, UK
Contact:

How to make a bot oper?

Post by Moose »

Using a "!tcl"style script where you can input tcl code into the bot via DCC or a public channel, how would you make a bot oper with a username and password.

I've tryed using this "!tcl putserv "oper user pass""

But that does not work, any reasons why or have I just got it all wrong?

Thanks in advance!
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

You have it slightly wrong.

the .tcl command can only be used from the partyline not externally with !tcl unless there was a script already made and had bound the !tcl trigger here is a small script that will oper your bot up as long as it has an oline. Remember that opering a bot up when you have distrustfull users added to the bot could be a huge security risk, just be carefull.

Code: Select all

bind pub n !oper oper:bot

set username "username"
set password "password"

proc oper:bot { nick uhost hand chan args } {
    global username password
     
    putserv "OPER $username $password"
}
This will oper your bot up when you type !oper in the channel only owners will be able to execute that command. use this as a starting point and build on it to do more oper commands. have fun :)
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Re: How to make a bot oper?

Post by YooHoo »

Moose wrote:Using a "!tcl"style script where you can input tcl code into the bot via DCC or a public channel, how would you make a bot oper with a username and password.
I've tryed using this "!tcl putserv "oper user pass""
But that does not work, any reasons why or have I just got it all wrong? Thanks in advance!
you need to work on your syntax a bit. If you already have a script binding the tcl command to a public trigger such as !tcl, as your post indicated, use correctly syntax'd arguments will solve your problem, although spitting out your bot's password publically in any channel is a security risk..... Here is a quick example of how you might use it to identify to nickserv, and op with chanserv......

Code: Select all

!tcl putmsg Nickserv "IDENTIFY $botnick botpass"
!tcl putmsg Chanserv "oper $botnick botpass"
Note that you can accomplish the same thing using PUTSERV with minimal difference.....

Code: Select all

!tcl putserv "PRIVMSG Nickserv :IDENTIFY $botnick botpass"
Read tcl-commands.doc, included with every eggdrop in the ~doc directory...
Hope this helps! :mrgreen:
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

YooHoo, he asked how to oper his bot not how to identify with nick/chanserv. If he wanted to op his bot using chanserv it would be "op $botnick $botpass" not oper as you suggested. If the IRCD has services and he wanted to oper his bot he would use 'operserv' todo so else it would be just a straight oper command to the server as my small script demonstrates.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

Moose wrote:I've tryed using this "!tcl putserv "oper user pass""

But that does not work, any reasons why or have I just got it all wrong?
granted i dont know [censored] about o-lines...and I did presume he was just trying to op his bot via chanserv...guess I'm still a bit confused...i guess i cant picture .tcl putserv "oper user pass" doing anything at all....i still dun understand why he would want to do this sort of thing with a public trigger in the first place...

:roll: screw it, who's got the beer??
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

I got beer you wanna few for the road??? :)

I think Moose is just a bit misguided in what he thinks an eggdrop will do and what it actually does. I used to oper my bots up on my own IRCD. I used them to scan for proxies as people join the server and remove unwanted users from the server with oper commands such as '/gline nick' which will remove them and prevent them joining the server again. But in order to use those commands you have to oper up first :wink:

Hope this clears things up a little.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

bots for ircOps, eh? lololol
now i need an 18-pack... :shock:
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

LOL, yeah I know what you mean, They are usefull to help out with the mundane jobs that IRCops usually perform like giving ops to a channel owner if they have lost ops in the channel etc and they are fine to be opered up IF you restrict what the bot is allowed to do and who has access to the bot.

:As a side note to anyone thinking of opering there bots up, I have seen many IRCD's taken down due to sloppy protection on eggdrops that are opered up. If you do oper eggdrops up then dont just rely on eggdrops own protection to stop people gaining access to the bot or using channel commands. Users that require use of such public commands should have to authorise themselves first by means of a password before they can use commands you have written for your bots. A simple command to the IRCD can ban all users from your server. You have been warned.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
Moose
Voice
Posts: 37
Joined: Mon Aug 18, 2003 2:54 am
Location: Northamption, UK
Contact:

woha

Post by Moose »

thx for the response!!!

First I know wat i'm doing with the eggie, been using them about 5 years now just never used tcl that much, the !tcl script i ahve i made is only used in the staff channel and can ONLY be used there so its pretty secure.

Also, got it working myself, just did not get the syntax right the first time.

Thanks anyway!!
Locked