Define/Explain **UPDATED**

By UK-Sw1ft on Jun 13, 2005

its about time i updated this lol, so here it is, all cmds are below.

;#commands#
;$define add <nick> <definition>
;$define update <nick> <definition>
;$define <remove> <nick>
;$explain <nick>

;# The Script.#

on 1:TEXT:$($!define*):#:{
  if ($nick isop $chan) {
    if ($2 == add) {
      if ($readini(define-explain.ini,$chan,$address($3,1))) { 
        msg $chan ( $+ $3 $+ ) Is allready In My Datebase, Try Updating ( $+ $3 $+ 's $+ ) Definition $+.
      }
      else {  
        /writeini define-explain.ini $chan $address($3,1) $4- 
        msg # Definition For ( $+ $3 $+ ) Is Now ( $+ $readini(define-explain.ini,$chan,$address($3,1)) $+ )
        halt 
      }
    }
    if ($2 == update) {
      if (!$readini(define-explain.ini,$chan,$address($3,1))) {
        msg $chan ( $+ $3 $+ ) Does Not Exist In My Datebase $+ .
      }
      else {
        /writeini define-explain.ini $chan $address($3,1) $4- 
        msg $chan New Definition of ( $+ $3 $+ ) Is ( $+ $readini(define-explain.ini,$chan,$address($3,1)) $+ $chr(41)
      } 
    }
    if ($2 == remove) {
        if (!$readini(define-explain.ini,$chan,$address($3,1))) {
          msg $chan ( $+ $3 $+ ) Does Not Exist In My Datebase $+ .
        }
        else {
          /remini define-explain.ini $chan $address($3,1)
          msg $chan ( $+ $3 $+ 's $+ ) Date Has Been Removed $+ .
       }
    }
  }
}

on 1:TEXT:$($!explain*):#:{
  if (%explain) { 
    halt 
  }
  else {
    if ($readini(define-explain.ini,$chan,$address($2,1)) == $null) {
      set -u8 %explain 1 |  msg # ( $+ $2 $+ ) Does Not Exist In My Datebase $+ . 
      halt 
    }
    else {
      set -u8 %explain 1 | msg # ( $+ $2 $+ 's $+ ) Definition: $chr(40) $+ $readini(define-explain.ini,$chan,$address($2,1)) $+ $chr(41) | halt 
    }
  }
}

Comments

Sign in to comment.
Yoinx   -  Jul 06, 2005

while you\'re at it you should\'ve fixed Datebase to Database.

 Respond  
Whitey   -  Jul 06, 2005

Just pointing out a typo...

   msg $chan ( $+ $3 $+ ) Is allready In My Datebase, Try Updating ( $+ $3 $+ \'s $+ ) Definition $+.

should be

   msg $chan ( $+ $3 $+ ) Is already In My Datebase, Try Updating ( $+ $3 $+ \'s $+ ) Definition $+.

:).

Nice script.

/Whitey

 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.