oobi's bot 1.3

By oobi on May 28, 2009

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 }

Comments

Sign in to comment.
Jethro   -  Nov 02, 2010

Regex is convenient to strip out control codes with the /S modifier and useful for multiple triggers. One thing to note that regex is not to be abused.

 Respond  
DevAkim   -  Nov 02, 2010

Lol Liam, do kill yourself, kthxbye.

 Respond  
DevAkim   -  Oct 17, 2010

You could use a variable that's set when it's loaded instead of manually changing the nick/password. Also, you don't really need regex for this. :s

 Respond  
Spanky   -  Jun 21, 2009

yes liam: please do kill yourself you will be doing us all a big favor! [size=29]das spiel[/size]

 Respond  
oobi   -  Jun 14, 2009

liam: kill yourself please lol

 Respond  
Tea   -  Jun 14, 2009

Phew, finally got on here. I like how you've went with your own unqiue side instead of what is more simple, as long as it works, right? The regular expressions used in it are =o
But really nice work for your first script man, 6/10 I'll vote when the days are up. The game also.

 Respond  
oobi   -  Jun 13, 2009

sad face of time :( @ spencer

 Respond  
Spanky   -  Jun 13, 2009

okay the (goes to talk to sis to make you change it) but, yea i know im just being picky but yea, i cant convince a jew to change his scripts :( (does sad face of all eternity)

 Respond  
oobi   -  Jun 13, 2009

People can be on my back about it all they want but it won't convince me otherwise, i am taking advice and i will choose whether or not it is useful enough for what i have in mind, thanks for the idea though :P

 Respond  
Spanky   -  Jun 13, 2009

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,

 Respond  
oobi   -  Jun 13, 2009

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.

 Respond  
Spanky   -  Jun 13, 2009

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

 Respond  
Acclamator   -  Jun 04, 2009

for a first script, i am impressed, i didnt learn basic regex for a while, and this script does the job perfect, 10/10.

 Respond  
iCub   -  May 29, 2009

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

 Respond  
Eurynome   -  May 29, 2009

oobi... I see.lol

 Respond  
Gottesgeschenk   -  May 29, 2009

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 :)

 Respond  
SudsyUncle   -  May 28, 2009

@ 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 
  }
 Respond  
xXLifelessxLoren__x   -  May 28, 2009

Damnit, Matt >:|

 Respond  
oobi   -  May 28, 2009

thanks you game losing whore

 Respond  
xXLifelessxLoren__x   -  May 28, 2009

Nice job Matt, :) Well done for your first script

 Respond  
WorldDMT   -  May 28, 2009

better do this

mode # + $+ $str(o,$iif($numtok($2-,32) > $modespl,$v2,$v1)) $2-
 Respond  
Blubble   -  May 28, 2009

I'm not really a big fan of the user thing in mIRC. But nice script :)

 Respond  
Jethro   -  May 28, 2009

Yeah, I agree with Spanky's notion in "expressing your own individuality." To further detail WoldDMT $modespl, you can use, for instance,

mode # + $+ $str(o,$modespl) $2-

This will give maximum +o parameter allowed in a server to more than one person at a time.

 Respond  
WorldDMT   -  May 28, 2009

hi

"mode # +hhhhh $2- " don't forget $modespl

 Respond  
Spanky   -  May 28, 2009

oobijew, nice btw like from you're first bot script to this i say heh and @ jethro and sudsyuncle people have there own patterns of scripting and this is oobijews way and like it isnt a bad snippet we have All seen a lot worse, ps (the game)

 Respond  
oobi   -  May 28, 2009

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.

 Respond  
SudsyUncle   -  May 28, 2009

true, but by definition > Regular expressions are basically a grammar that can be used to perform complicated pattern matching operations.and construction having over 20 regexed events defeats the point

quote = mIRCHelpfile

 Respond  
Jethro   -  May 28, 2009

you l00|< r337 to other n00bs@SudsyUncle: you don't have to sound cynical. Nobody was born with the knowledge in regular expressions. Use constructive criticism with your response.

 Respond  
SudsyUncle   -  May 28, 2009

because if you use reg expressions, even wrongly, you l00|< r337 to other n00bs

hint: @ max that all should be 2 events using regex or not; but really only 1

 Respond  
Jethro   -  May 28, 2009

Why did you use regular expressions for this? You don't need regex to achieve this. You can simply use a regular on text event, if statements, $1 and $2 identifier to have the same function.

What's the letter s flag for? You only need /Si means to strip control codes and make it case insensitive.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.