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 

Auto Oper
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
TheDevil
Voice


Joined: 29 Mar 2008
Posts: 8

PostPosted: Sat Mar 29, 2008 7:59 am    Post subject: Auto Oper Reply with quote

I want a script so that when the bot connects to the network it will..

Oper up using a nick and password specified in the script.
Identify to nickserv (Using /msg nickserv identify password)
and finally set mode H on its self.

So that it hides its Oper status.

I want to make a voice bot that doesnt need channel operator status.

Thanks
Back to top
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sat Mar 29, 2008 9:18 am    Post subject: Reply with quote

Code:
# This is a Tcl script to be run immediately after connecting to a server.
bind evnt - init-server evnt:init_server

proc evnt:init_server {type} {
  global botnick
  putquick "PRIVMSG NickServ :identify <password>"
  putquick "MODE $botnick +i-ws"
}
this is found in your conf file, alter it to suit your needs
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
TheDevil
Voice


Joined: 29 Mar 2008
Posts: 8

PostPosted: Sat Mar 29, 2008 6:44 pm    Post subject: Reply with quote

YooHoo wrote:
Code:
# This is a Tcl script to be run immediately after connecting to a server.
bind evnt - init-server evnt:init_server

proc evnt:init_server {type} {
  global botnick
  putquick "PRIVMSG NickServ :identify <password>"
  putquick "MODE $botnick +i-ws"
}
this is found in your conf file, alter it to suit your needs


I edited this and the bot fails to identify and oper.
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sat Mar 29, 2008 11:48 pm    Post subject: Reply with quote

it should look similar to:
Code:

bind evnt - init-server oper
proc oper {type} {
  putserv "OPER <login> <password>"
}
Back to top
View user's profile Send private message
TheDevil
Voice


Joined: 29 Mar 2008
Posts: 8

PostPosted: Sun Mar 30, 2008 4:12 am    Post subject: Reply with quote

DragnLord wrote:
it should look similar to:
Code:

bind evnt - init-server oper
proc oper {type} {
  putserv "OPER <login> <password>"
}


made sure it says putserv and it still fails to oper and fails to identify to nickserv as well.
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sun Mar 30, 2008 12:03 pm    Post subject: Reply with quote

TheDevil wrote:
DragnLord wrote:
it should look similar to:
Code:

bind evnt - init-server oper
proc oper {type} {
  putserv "OPER <login> <password>"
}


made sure it says putserv and it still fails to oper and fails to identify to nickserv as well.
Then you have other problems.
Start your bot with the -nt switches.
Back to top
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sun Mar 30, 2008 2:43 pm    Post subject: Reply with quote

it was said like three times that you have to alter the script to suit your needs, I have no idea how or to whom your bot is supposed to ask for oper status on your network without more information. To make the bot oper-up, identify to nickserv, and then finally set itself mode +H, you just need to add all the parts together in the same procedure, something like this:
Code:
proc evnt:init_server {type} {
  global botnick
  putquick "PRIVMSG NickServ :identify <password>"
  putquick "PRIVMSG OperOp :login <password>
  putquick "MODE $botnick +H"
}
Now you are expected to alter this procedure to suit your needs.
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
TheDevil
Voice


Joined: 29 Mar 2008
Posts: 8

PostPosted: Sun Mar 30, 2008 3:21 pm    Post subject: Reply with quote

YooHoo wrote:
it was said like three times that you have to alter the script to suit your needs, I have no idea how or to whom your bot is supposed to ask for oper status on your network without more information. To make the bot oper-up, identify to nickserv, and then finally set itself mode +H, you just need to add all the parts together in the same procedure, something like this:
Code:
proc evnt:init_server {type} {
  global botnick
  putquick "PRIVMSG NickServ :identify <password>"
  putquick "PRIVMSG OperOp :login <password>
  putquick "MODE $botnick +H"
}
Now you are expected to alter this procedure to suit your needs.


to oper its /oper user pass

to identify its /nickserv identify password or /msg nickserv identify password

to set mode H its /mode me +H
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sun Mar 30, 2008 8:41 pm    Post subject: Reply with quote

Code:
set oper(user) "foo"
set oper(pass) "bar"
set oper(modes) "+H"; # Must be in format +-flags
set nickserv(host) "nickserv@some.network.org"
set nickserv(pass) "foobar"
set nickserv(modes) ""; # Must be in format +-flags

bind evnt - {init-server} evnt:auto

proc evnt:auto {event} {
    global botnick oper nickserv
    if {$oper(user) != "" && $oper(pass) != ""} {
        putquick "OPER :$oper(user) $oper(pass)"
        if {$oper(modes) != ""} {
            putquick "MODE $botnick $oper(modes)"
        }
    }
    if {$nickserv(host) != "" && $nickserv(pass) != ""} {
        putquick "PRIVMSG $nickserv(host) :identify $nickserv(pass)"
        if {$nickserv(modes) != ""} {
            putquick "MODE $botnick $nickserv(modes)"
        }
    }
}


Untested!
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Mon Mar 31, 2008 12:24 am    Post subject: Reply with quote

Code:
proc evnt:init_server {init-server} {
  global botnick
  putquick "PRIVMSG Nickserv :identify <nick password>"
  putquick "oper <oper nick> <oper password>"
  putquick "MODE $botnick +Hi"
}

Works, tested (quite often).
Back to top
View user's profile Send private message
Ron-skY
Voice


Joined: 15 Mar 2009
Posts: 2

PostPosted: Sun Mar 15, 2009 8:19 pm    Post subject: re: getting an IRC oper Reply with quote

Hi,

I've done some reading about this, but I am a little bit confused about getting an IRC Operator status for my bot as it joins the designated server.

I am using eggdrop for my own irc server (running on newest ngircd) and I've set up eggdrop.conf like this:

Code:

proc evnt:init_server {type} {
  global botnick

  putquick "OPER $botnick <my_superb_password>"
  putquick "MODE <desired_channel> +o $botnick"
  putquick "MODE $botnick +Hi"
  putquick "MODE $botnick -ws"
  putquick "MODE $botnick -o"
}

Note that values in lt/gt are replaced for the purposes of thread posting. Bot is also properly set as IRC Operator in ngircd.conf.

If I understand correctly, the proper way of setting up eggdrop as channel operator is this:
1) get an IRC operator status via /OPER
2) set +o for itself on that channel
3) (possibly for more security) de-op IRC operator status (via -o)

It's possible that I am wrong, the commands you see above are derived from my experiments as regular user (so I tried to oper up, give myself +o on channel, then de-op myself again).

Anyways, auto-oping for eggdrop does not work, so if anyone can come up with anything I might be/am doing wrong, I'd more than appreciate it.
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Sun Mar 15, 2009 10:58 pm    Post subject: Reply with quote

for an irc-operator to be able to change modes for a channel, they must use the OPMODE command instead of MODE

Also dont use botnick for your oper username, just put the entery you entered as username for the eggdrop's oper block.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
Ron-skY
Voice


Joined: 15 Mar 2009
Posts: 2

PostPosted: Sun Mar 15, 2009 11:40 pm    Post subject: re: Reply with quote

Thank you for your response.

I've changed the command to OPMODE, but it seems to have no effect (also my irc server does not recognize that command, when I try it as a user/IRC operator).

I replaced the botnick variable with the bot username, as you suggested, so the config now looks like this:

Code:

bind evnt - init-server evnt:init_server

proc evnt:init_server {type} {
  global botnick

  putquick "OPER mybot mightypassword"
  putquick "OPMODE #somechannel +o mybot"
  putquick "MODE mybot +Hi"
  putquick "MODE mybot -ws"
  putquick "MODE mybot -o"
}


This also didn't help.

The discussed channel is persistent and in eggdrop.conf, it's set with no parametres. I hope that does not collide with anything.

Any other suggestions, where to look?

Thank you
Back to top
View user's profile Send private message
ali3n0
Voice


Joined: 25 Oct 2010
Posts: 5

PostPosted: Mon Oct 25, 2010 3:16 pm    Post subject: Reply with quote

Hi folks. I'm new to eggdrop and I'm playing around a bit. I've got the same environment, ngircd and eggdrop.

Actually seems that OPER works fine (at least according to ngircd logs) but I can't get the need-op function to be called after #channel join.

This works to me:
bind evnt - init-server evnt:init_server

Code:

proc evnt:init_server {type} {
  global botnick
  putquick "OPER <Oper> <Pass>"
}


but not this:

Code:

channel add #somechannel {
      chanmode "+nt-likm"
      need-op { putquick "MODE #somechannel +o mybotnick" }


#somechannel is correctly joined at startup though. I've tried other need-op commands, such as putserv "PRIVMSG mynick ciao", but I get no messages to mynick...
_________________
Alexander Fortin
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Mon Oct 25, 2010 9:02 pm    Post subject: Reply with quote

ali3n0 wrote:

...
#somechannel is correctly joined at startup though. I've tried other need-op commands, such as putserv "PRIVMSG mynick ciao", but I get no messages to mynick...



I'm not familiar with ngircd.

In the partyline, try:
.chaninfo #channel
and look for a line:
<botnick> To regain op's (need-op):
<botnick> putserv "privmsg chanserv :op #channel $botnick"

You may or may not have them now.

Here is a line I use, to set the above:
Code:

.chanset #channel need-op  putserv "privmsg chanserv :op #channel $botnick"


You can read a little about it with:
.help chaninfo and you'll have to find it, in the long return.
or, check here: http://www.egghelp.org/commands/channels.htm
for need-op .

Sorry that I'm don't know ngircd, to be able to give you the exact command that you'd need to set it. With some experimenting though, you should be able to get it.

I hope this helps.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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