Code: Select all
# 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"
}
I edited this and the bot fails to identify and oper.YooHoo wrote:this is found in your conf file, alter it to suit your needsCode: Select all
# 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" }
Code: Select all
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.DragnLord wrote:it should look similar to:Code: Select all
bind evnt - init-server oper proc oper {type} { putserv "OPER <login> <password>" }
Then you have other problems.TheDevil wrote:made sure it says putserv and it still fails to oper and fails to identify to nickserv as well.DragnLord wrote:it should look similar to:Code: Select all
bind evnt - init-server oper proc oper {type} { putserv "OPER <login> <password>" }
Code: Select all
proc evnt:init_server {type} {
global botnick
putquick "PRIVMSG NickServ :identify <password>"
putquick "PRIVMSG OperOp :login <password>
putquick "MODE $botnick +H"
}
to oper its /oper user passYooHoo 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:Now you are expected to alter this procedure to suit your needs.Code: Select all
proc evnt:init_server {type} { global botnick putquick "PRIVMSG NickServ :identify <password>" putquick "PRIVMSG OperOp :login <password> putquick "MODE $botnick +H" }
Code: Select all
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)"
}
}
}
Code: Select all
proc evnt:init_server {init-server} {
global botnick
putquick "PRIVMSG Nickserv :identify <nick password>"
putquick "oper <oper nick> <oper password>"
putquick "MODE $botnick +Hi"
}
Code: Select all
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"
}
Code: Select all
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"
}
Code: Select all
proc evnt:init_server {type} {
global botnick
putquick "OPER <Oper> <Pass>"
}
Code: Select all
channel add #somechannel {
chanmode "+nt-likm"
need-op { putquick "MODE #somechannel +o mybotnick" }
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...
Code: Select all
.chanset #channel need-op putserv "privmsg chanserv :op #channel $botnick"