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"
}
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......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!
Code: Select all
!tcl putmsg Nickserv "IDENTIFY $botnick botpass"
!tcl putmsg Chanserv "oper $botnick botpass"
Code: Select all
!tcl putserv "PRIVMSG Nickserv :IDENTIFY $botnick botpass"
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...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?