All pastes #126824 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-08-11 20:49 UTC
rendered paste body
if ($1 == $readini(Settings.ini,$chan,Trigger) $+ unbind) {
    if ($address($nick,2) == $readini(Settings.ini,$chan,Owner)) {
      if (!$2) {
        notice $nick To use the UNBIND command, You must enter the command followed by the command you want to unbind/delete!
        halt
      }
      if ($readini(Settings.ini,$chan,Trigger) isin $2) {
        notice $nick Please do not include the trigger in your syntax, I will do that auto!
        halt
      }
      if (!$readini(Settings.ini,$chan,$2)) {
        notice $nick That command is not bound! To add this command type $+ $readini(Settings.ini,$chan,Trigger) $+ bind $2 $+ 
        halt
      }
      if ($2 !isin $readini(Settings.ini,$chan,Commands)) {
        notice $nick That command ( $+ $2 $+ ) cannot be changed threw the BIND command, You must find another way to change that setting!
        halt
      }
      var %p 1
      while (%p <= $gettok($readini(Settings.ini,$chan,Commands),0,32)) {
        if ($2 == $gettok($readini(Settings.ini,$chan,Commands),%p,32)) {
          writeini Settings.ini $chan Commands $deltok($readini(Settings.ini,$chan,Commands),%p,32)
          remini Settings.ini $chan $2
          notice $nick Commands  $+ $2 $+  has been removed!
        }
        inc %p
      }
    }
  }