SlunkBot

By Acclamator on Sep 16, 2008

This is slunkbot, i am going to say right now that i am not an experienced scripter, i just got bored and made this fella. He is basically made to help people keep control of their channels, by using a specified user list for command that only friends can use etc...
you paste this code neatly in the remotes section of mirc (press alt+r to get to remotes)
and paste the code in there. after you paste the code AND SAVE IT, type /slunkstart to begin using the script.

alias slunkstart { auser slunkaccess $address($me ,1)
  auser slunklord $address($me ,1)
  echo -a hello, welcome to slunkbot. the commands for you, the owner, are:
  echo -a /scom (tells you the commands in case you forget)
  echo -a /ipban (for the more permanent ban ie: /ipban bob)
  echo -a /unipban (undoes the ban ie: /unipban bob
  echo -a /addslunk (adds people to your special access list, this means only they can use your bot.)
  echo /delslunk (removes people from the access list, so they no longer have access.)
  echo /sban (starts a timed ban, for example "/sban bob 120" will ban bob for 120 seconds. (two minutes))
echo /smute (mutes the person for a selected amount of time, "/smute bob 120" will mute bob for 120 seconds. (two minutes)) }
alias scom { echo hello, welcome to slunkbot. the commands for you, the owner, are:
  echo /ipban (for the more permanent ban ie: /ipban bob)
  echo /unipban (undoes the ban ie: /unipban bob
  echo /addslunk (adds people to your special access list, this means only they can use your bot.)
  echo /delslunk (removes people from the access list, so they no longer have access.)
  echo /sban (starts a timed ban, for example "/sban bob 120" will ban bob for 120 seconds. (two minutes))
echo /smute (mutes the person for a selected amount of time, "/smute bob 120" will mute bob for 120 seconds. (two minutes)) }
on slunkaccess:TEXT:!opmy*:#: { mode $chan +o $2 
if ( $2 == $null ) { mode $chan +o $nick } }
on slunkaccess:TEXT:!deopmy*:#: { mode $chan -o $2 
if ( $2 == $null ) { mode $chan -o $nick } }
on slunkaccess:TEXT:!ipban*:#: { mode $chan +b $address($2 ,1) }
on slunkaccess:TEXT:!unipban*:#: { mode $chan -b $address($2 ,1) 
kick $chan $2 ipbankik }
on slunkaccess:TEXT:!addslunk*:#: { auser slunkaccess $address($2 ,1) 
msg $chan " $2 has been added to slunkaccess " }
on slunklord:TEXT:!delslunk*:#: { ruser slunkaccess $address($2 ,1)
msg $chan " $2 has been removed from slunkaccess " }
on slunkaccess:TEXT:!slunk:#: { query $nick these are my commands vvvvvvv
  msg $nick the commands are !opmy (for opping yourself, or someone else)
  msg $nick !ipban (for banning those who piss u off) 
  msg $nick !unipban (does the opposite)
  msg $nick !sban (bans a person for a certain length of time, type !sban bob 120 (bob will be banned for 120 seconds, or two minutes)
  msg $nick !smute ( mutes the person for a certain amount of time: !smute bob 120 (bob will be muted for 120 seconds, or two minutes)
  msg $nick !addslunk (for adding ppl to the list of ppl who can use these commands) 
  msg $nick !skick (for kicking ppl) and 
  msg $nick !delslunk... (my command only)
closemsg $nick }
on *:JOIN:#: mode $chan +v $nick
on slunkaccess:TEXT:!skick*:#: kick $chan $2 byebye
alias /ipban { mode $chan +b $address($1 ,1) }
alias /unipban { mode $chan -b $address($1 ,1) }
alias /addslunk { auser slunkaccess $address($1 ,1) 
  echo -a $1 has been added to slunkaccess.
.notice $1 You have been added to slunkbot's access user list. Type !slunk for the commands. }
alias /delslunk { ruser slunkaccess $address($1 ,1) 
  echo -a $1 has been removed from slunkaccess. 
.notice $1 You have been removed from slunkbot's access user list. }
alias sban { mode $chan +b $address($1 ,1) 
  .timer 1 $2 mode $chan -b $address($1 ,1)
msg $chan $1 has been banned for $2 seconds }
on slunkaccess:TEXT:!sban*:#: { mode $chan +b $address($2 ,1) 
  .timer 1 $3 mode $chan -b $address($2 ,1)
msg $chan $2 has been banned for $3 seconds }
on slunkaccess:TEXT:!smute*:#: { mode $chan +m 
  msg $chan $2 has been muted for $3 seconds
  mode $chan -v $2
  .timer 1 $3 mode $chan +v $2 
  .timer 1 $3 mode $chan -m 
.timer 1 $3 msg $chan you have been unmuted }
alias sban { mode $chan +b $address($1 ,1) 
  .timer 1 $2 mode $chan -b $address($1 ,1)
msg $chan $1 has been banned for $2 seconds }
alias smute { mode $chan +m 
  msg $chan $1 has been muted for $2 seconds
  mode $chan -v $1
  .timer 1 $2 mode $chan +v $1 
.timer 1 $2 mode $chan -m }

Comments

Sign in to comment.
^Neptune   -  Sep 21, 2008

/me slunkz

 Respond  
Acclamator   -  Sep 17, 2008

The point was to give the person ops if they change computer, but you are right, the i should have made it accept the nick in case of the owner using a diff ip... anyways, i made this in an hour, its my very first time scripting, and honestly it works and i like it, so maybe others will too. But yeah, it has some major issues...

 Respond  
Jamiie   -  Sep 17, 2008

Whats the point of this?

alias slunkstart { auser slunkaccess $address($me ,1)
  auser slunklord $address($me ,1)

I would assume /auser is used for another nick, not the nick the script is loaded on for $me

 Respond  
Cheiron   -  Sep 17, 2008

without my first cuppa coffee in the morning.... firstly... you have noisy commands flying all over the place.. eg

 timer 1 $2 mode $chan -b $address($1 ,1) 
 echo -a $1 has been removed from slunkaccess. 
notice $1 You have been removed from slunkbot's access user list. } 

make the timers and notices all .timer and .notice.

also whilst on the subject of timers.. they are non working as you have only given one parameter. to make a timer work you need 2 parameters. eg (.timer 1 5 ) that example gives a 5 second delay. umm what else.. oh yes.. the echos. you have some labelled as echo -a and others just as echo. you need to take time to ensure all commands are labelled correctly :)

gonna leave the rest till i either get a decent brew on or the others get there first. otherwise the script seems to cover a good part of the basics. with some editing and cleaning up of code it has potential :)

 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.