this is pretty much my first real script of any kind, i am open to criticism and ideas, the more the better.
to use the bot you must first change yournickhere to the nick you plan on using the most, and for the id script replace yourpassword here with your nickserv password.
the commands shouldn't be that hard to figure out: accadd command to be used like this...!accadd nickhere accesslevelhere
to remove from the access list just !accdel nickhere
and last, and most important, make sure to add yourself to the auser list, or you yourself would not be able to use your own bot.
to use the !join command you don't need to put the # before the channel name
any questions regarding anything, you can find me at /server -m chat.peercommons.net #kicked (or #oobi)
Some credit goes to Jethro_ for this latest update with the usermodes part of the script
With 1.3 there is very little change to it, the only change made is the way it adds users to the bot owner list, it adds nick and address, as opposed to just nicks and announces the nick!*user@host instead of just the nick (fixed not working ruser command in 1.3)
update coming soon trying something a bit new to me, so be patient on the updates, going to try my best to get it done as soon as possible. Unlike previously stated earlier, it will still have regex, but it will strip control codes better, making it a bit better (in my opinion)
On $owner:Text:/^[!%.](halfop)/Si:#: { mode # + $+ $str(h,$modespl) $2- }
On $owner:Text:/^[!%.](dehalfop)/Si:#: { mode # - $+ $str(h,$modespl) $2- }
On $owner:Text:/^[!%.](op)/Si:#: { mode # + $+ $str(o,$modespl) $2- }
On $owner:Text:/^[!%.](deop)/Si:#: { mode # - $+ $str(o,$modespl) $2- }
On $owner:Text:/^[!%.](admin|protect)/Si:#: { mode # + $+ $str(a,$modespl) $2- }
On $owner:Text:/^[!%.](deprotect|deadmin)/Si:#: { mode # - $+ $str(a,$modespl) $2- }
On $owner:Text:/^[!%.](owner)/Si:#: { mode # + $+ $str(q,$modespl) $2- }
On $owner:Text:/^[!%.](deowner)/Si:#: { mode # - $+ $str(q,$modespl) $2- }
On $owner:Text:/^[!%.](part)/Si:#: { msg # yes massa | part # }
On $owner:Text:/^[!%.](id|identify)/Si:?: { ns id yourpasswordhere }
On $owner:Text:/^[!%.](kick|k)/Si:#: { kick # $2- }
On $owner:Text:/^[!%.](join|j)/Si:*: { join #$2 }
On $owner:Text:/^[!%.](voice)/Si:#: { mode # + $+ $str(v,$modespl) $2- }
On $owner:Text:/^[!%.](devoice)/Si:#: { mode # - $+ $str(v,$modespl) $2- }
On $owner:Text:/^[!%.](server)/Si:*: { server -m $2- }
On $owner:text:/^[!%.](nick)/Si:*: { nick $2- }
On $owner:text:/^[!%.](set|setmode)/Si:#: { mode # $2- }
On $owner:text:/^[!%.](inv|invite)/Si:#: { invite $2 # }
On $owner:text:/^[!%.](partall)/Si:#: { partall }
On $owner:text:/^[!%.](accadd|addacc)/Si:#: { cs access # add $2- 1 | msg $nick $2 has been added to the # access list at level $3. }
On $owner:text:/^[!%.](accdel|delacc)/Si:#: { cs access # del $2 | msg $nick $2 has been deleted from the # access list. }
on $*:text:/^[!%.](auser)/Si:#: if ($nick == yournickhere) { guser owner $2 | msg # $address($2,6) has been added as a bot owner | writeini userlist.ini users $2 $address($2,6) }
on $*:text:/^[!%.](ruser)/Si:#: if ($nick == yournickhere) { ruser $readini(userlist.ini,users,$2) | msg # $readini(userlist.ini,users,$2) has been removed as a bot owner | remini userlist.ini users $2 }
lol, i know but i mean people will use this bot with other scripts and like, meh i know where ur coming from but be a good jew and just do it k kay
on $*:text:/^[!%.](auser)/Si:#: if ($nick == yournickhere) { guser owner $2 | msg # $address($2,6) has been added as a bot owner | writeini userlist.ini users $2 $address($2,6) }
on $*:text:/^[!%.](ruser)/Si:#: if ($nick == yournickhere) { ruser $readini(userlist.ini,users,$2) | msg # $readini(userlist.ini,users,$2) has been removed as a bot owner | remini userlist.ini users $2 }
could be
on $*:text:/^[!%.](auser)/Si:#: if ($nick == yournickhere) { guser $3 $2 | msg # $address($2,6) has been added as level $3 on $me | writeini userlist.ini users $2 $address($2,6) }
on $*:text:/^[!%.](ruser)/Si:#: if ($nick == yournickhere) { ruser $readini(userlist.ini,users,$2) | msg # $readini(userlist.ini,users,$2) has had access removed from $me | remini userlist.ini users $2 }
i think im tired so if i fucked up il fix it but like. its not that hard, and it will keep other people off ur backs about it.. trust me im english. (edit) ps i think i have fucked up but il fix it later, for now im gonna bow out and let you lose the game,
Spencer access levels for a bot like this are pointless, if you can't trust someone enough to use a certain part of the bot you can't trust them to use it at all, it's pretty simple. Just be careful about who you make owner of your bot and then take them off if they do something you don't like. with that being said, thanks fag for making me lose the game.
first off i would like to say this to you oobi [size=29]The game [/size] secondly nice work i didnt learn basic regex for ages and like good job take my advice set more than one auser level, i mean instead of making everyone Owner if u give them access why not make them, admin of the bot. or, something or in your case would it be whore of the bot? anyways have fun losing the game and good job with the script you jew hope you keep updating. ps. liked 8/10
sup oobi, hows life?
anyways...
Nice looking script, I look forward to future updates from you. If I didn't have my own bot commands I may have considered using this.
@All Script Bashers:
At least some people are actually trying to do new and exciting things, instead of resorting to the simple on text events, oobi had taken it upon himself to learn something not many new scripters bother with. Think about what your 1st script was like before you go bashing on other people for trying.
/endrant
excellent script here, if I didn't have bot commands I'd use this.
this script makes it simple and easy to see what's being done when you do a certain thing, and it's a great script to build off of. You can look at it without being like 'Man, I know I'm never going to get into mIRC scripting'
@ SudsyUncle
everybody writes with style, if you want to rewrite the bot script and show us how you'd do it then make a new page for it rather than flood this one with condescending comments :)
@ the risk of sounding condescending, yet again. $modespl is pointless and moot, in a remote, unless you either loop or the user already knows the max.
To use $modespl and not be pointless you'd need something like
;set your vars
var %i = 1, %os
;set loop max to names
while (%i <= $numtok($2-,32)) {
;add a name
%os = %os $gettok($2-,%i,32)
;are we @ max yet?
if ($numtok(%os,32) == $modespl) {
;we're @ max so we mode
mode # $+(+,$str(o,$numtok(%os,32))) %os
;safety clear as mIRC is sometimes too slow
%os = ""
}
;loop some more
inc %i
}
;if any left or never hit max
if (%os) {
;mode names
mode # $+(+,$str(o,$numtok(%os,32))) %os
}
I know I don't need to use regex for this, but after I had made it (for my own bot) i figured i'd clean it up a bit and put it out for anyone to use if they want, and imo, it's a lot better than other bot scripts on hawkee (as far as simplicity is concerned) and about the /Si just simply something i forgot to do when cleaning up the original.