Top

!rules (add/del/list)


mIRC Code
+ 2 likes
Please Register to submit score.
Bookmark and Share
Average Score  5.0 (of 3 scores)
Date Added  Jan 03, 2009
Last Updated  Mar 31, 2009
Tags  add  bot  del  delete  list  mirc  remove  rules 

Introduction

Simple script where you can add|remove|list the rules, NOW WORKS FOR INDIVIDUAL CHANNELS ;)

if you add a rule in a specific channel, YOU MUST DELETE IT FROM THE CHANNEL YOU SET IT IN.

ty :)

Updated so it won't attempt to list the rules in the .ini if there are no rules there to list.
updated the error everyone kept talking about.

Any more errors, gimme a shout.

Grab the Code

alias loc return $iif($chan,$v1,$nick)
 
on $*:text:/^!rules\b/Si:*:{
  tokenize 32 $strip($1-)
  if ($2 == add) && ($nick isop $chan) {
    if ($3) {
      writeini rules.ini $chan $3- Added by $nick
      msg $chan 4" $+ $3- $+ " Added as a rule by $nick $+ .
    }
  }
  if ($2 == del) && ($nick isop $chan) {
    if ($3) {
      if ($readini(rules.ini,$chan,$3)) {
        remini rules.ini $chan $3- Added By $nick
        .msg $chan 4Removed $3- from rules list.
      }
    }
    else {
      msg $chan 4No such Rule entry.
      .notice $nick 4To see the list of Rule List Entries, type !Rules <list>
    }
  }
  if ($2 == list) && ($ini(rules.ini,$chan,0)) {
    .msg $loc 4Displaying A List Of Rules For $loc $+ :
    var %a 1, %z $ini(Rules.ini,$chan,0)
    while (%a <= %z) {
      .msg $loc 04 $+ %a $ini(rules.ini,$chan,%a) $readini(rules.ini,$chan,$ini(rules.ini,$chan,%a))
      inc %a
    }
    .msg $chan 4End of list. %z entry(s) displayed.
  }
  elseif ($2 == list) && (!$ini(rules.ini,$chan,0)) {
    .msg $loc 04Sorry $nick $+ , there are currently no rules for $chan $+ .
  }
}
 

Comments

  (16)  RSS
a careful warchild
Comments: 243
 
mIRC Snippet:  !rules (add/del/list)
Posted on Jan 3, 2009 11:59 am
to use it, you will need to set yourself as an auser at level 9999. or you can change the "9999" to a lower level if you wish.
DeathGod87
Comments: 10
 
mIRC Snippet:  !rules (add/del/list)
Posted on Jan 3, 2009 5:23 pm
7/10
Bullet_Dodger
Comments: 313
 
mIRC Snippet:  !rules (add/del/list)
Posted on Jan 3, 2009 6:01 pm
omg im not even going to explain to you how to use color commands without $strip 's
This isnt to usefull aswell =/ topics can explain rules

[2/10]
Aucun50
Comments: 548
 
mIRC Snippet:  !rules (add/del/list)
Posted on Jan 3, 2009 7:01 pm
"omg im not even going to explain to you how to use color commands without $strip 's" If $strip works why not use it? Also topics can explain rules but if your in a channel with like 100 people then the topic goes by fast.
Vox91
Comments: 18
 
mIRC Snippet:  !rules (add/del/list)
Posted on Jan 4, 2009 9:03 am
Perhaps you can change this:

Code:
    while (%a <= %z) {


in to:

Code:
     while (%a  %z) {

otherwise it will not return the last line of the ini (Last rule in this script)
PunkTuReD
Comments: 458
 
mIRC Snippet:  !rules (add/del/list)
Posted on Jan 4, 2009 10:39 am
yes it will, it says
<=
under or equal
ive never had a problem with it
a careful warchild
Comments: 243
 
mIRC Snippet:  !rules (add/del/list)
Posted on Jan 4, 2009 11:48 am
thanks guys, and bullet_fag $strip works perfectly, unlike you i create my scripts for release, therefore other users who use the scripts might not want to type /ignore -k *@* so stfu and go get butthurt by mikey again.
Spanky
Comments: 233
 
mIRC Snippet:  !rules (add/del/list)
Posted on Jan 4, 2009 5:11 pm
alright i like make it for specifc chans and itl be better but good work bud.
a careful warchild
Comments: 243
 
mIRC Snippet:  !rules (add/del/list)
Posted on Jan 5, 2009 12:43 pm
updated
Spanky
Comments: 233
 
mIRC Snippet:  !rules (add/del/list)
Posted on Jan 6, 2009 10:37 am
theres a problem if u do !rules add no spam then !rules add no flooding it deletes the first one.
Jubbyjubbster
Comments: 14
 
mIRC Snippet:  !rules (add/del/list)
Posted on Mar 30, 2009 2:33 pm
it dont work lol
a careful warchild
Comments: 243
 
mIRC Snippet:  !rules (add/del/list)
Posted on Mar 31, 2009 4:05 pm
Yeah yeah yeah, i know, i haven't really had the time (or in english: i havent been assed) to correct this. sorry, might do it soon.

Meh thought about it and updated. Should work, if it doesn't, give me a shout.
Spanky
Comments: 233
 
mIRC Snippet:  !rules (add/del/list)
Posted on Mar 31, 2009 6:00 pm
lol i know you said you're "busy" but yea do it xD or i will >.>
Spanky
Comments: 233
 
mIRC Snippet:  !rules (add/del/list)
Posted on Apr 1, 2009 2:50 pm
iv sorta got it working :/ its not perfect but still..
Code:
 
alias loc return $iif($chan,$v1,$nick)

on $*:text:/^!rules\b/Si:*:{
  tokenize 32 $strip($1-)
  if ($2 == add) && ($nick isop $chan) {
    inc %rules
    if ($3) {
      writeini rules.ini $chan %rules $3- Added by $nick
      msg $chan 4" $+ $3- $+ " Added as a rule by $nick $+ .
    }
  }
  if ($2 == del) && ($nick isop $chan) {
    if ($3) {
      if ($readini(rules.ini,$chan,$3)) {
        remini rules.ini $chan $3- Added By $nick
        .msg $chan 4Removed $3- from rules list.
        dec %rules
      }
    }
    else {
      msg $chan 4No such Rule entry.
      .notice $nick 4To see the list of Rule List Entries, type !Rules <list>
    }
  }
  if ($2 == list) && ($ini(rules.ini,$chan,0)) {
    .msg $loc 4Displaying A List Of Rules For $loc $+ :
    var %a 1, %z $ini(Rules.ini,$chan,0)
    while (%a <= %z) {
      .msg $loc 04 $+ $ini(rules.ini,$chan,%a) $readini(rules.ini,$chan,$ini(rules.ini,$chan,%a))
      inc %a
    }
    .msg $chan 4End of list. %z entry(s) displayed.
  }
  elseif ($2 == list) && (!$ini(rules.ini,$chan,0)) {
    .msg $loc 04Sorry $nick $+ , there are currently no rules for $chan $+ .
  }
}



i know its not "perfect" but it works.. :)
Renegade
Comments: 37
 
mIRC Snippet:  !rules (add/del/list)
Posted on May 1, 2009 6:01 pm
Hold your nellies,
now this is epically late... but do tell me why I was mentioned...

thanks guys, and bullet_fag $strip works perfectly, unlike you i create my scripts for release, therefore other users who use the scripts might not want to type /ignore -k *@* so stfu and go get butthurt by mikey again.

/latest ever!!!! What an achievement Q_Q
Aile
Comments: 12
 
mIRC Snippet:  !rules (add/del/list)
Posted on Oct 21, 2009 4:53 am
remini rules.ini $chan $3- Added By $nick <-- that line you only need remini rules.ini $chan, and in order to have this removed from anychannel, simpley do this, remini rules.ini # $+ $2 ; It will still read it as $chan because its looking to whats in it, so if you know the name, it will delete as well.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom