All pastes #132081 Raw Edit

Untitled

public text v1 · immutable
#132081 ·published 2006-08-15 03:17 UTC
rendered paste body
raw 330:*:{
  if (%whoami.auth == $2) {
    var %a = $mysql(query,mysql SELECT * FROM `auth` WHERE `auth` = ' $+ $esc($3) $+ ')
    var %a = $gettok($mysql(rowsaffected,mysql),5,32)
    if (%a == 1) {
      if ($gettok($gettok($mysql(fetchrow,mysql 1 -),1,45),6,32) != $2) || ($gettok($mysql(fetchrow,mysql 1 -),2,45) != %whoami.addr) || ($gettok($mysql(fetchrow,mysql 1 -),3,45) != $3) {
        var %a = UPDATE `auth` $&
          SET $iif($gettok($gettok($mysql(fetchrow,mysql 1 -),1,45),6,32) != $2,`Last Nick` = ' $+ $esc($v2) $+ ' $+ $iif($gettok($mysql(fetchrow,mysql 1 -),2,45) != %whoami.addr,$chr(44)), $&
          $iif($gettok($mysql(fetchrow,mysql 1 -),2,45) != %whoami.addr,`Address` = ' $+ $esc($v2) $+ ' $+ $iif($gettok($mysql(fetchrow,mysql 1 -),3,45) != $3,$chr(44)), $& 
          $iif($gettok($mysql(fetchrow,mysql 1 -),3,45) != $3,`Auth` = ' $+ $esc($v2) $+ '))) $&
          WHERE `auth` = ' $+ $esc($3) $+ '
        msg #pumabots %a
        var %a = $mysql(query,mysql %a)
        unset %whoami.*
        .notice $2 whoami >> You, $2 ( $+ $3 $+ ) are now recognized!
      }
      else {
        unset %whoami.*
        .notice $2 whoami >> You, $2 ( $+ $3 $+ ) are now recognized!
      }
    }
    else {
      var %a = INSERT INTO `auth` (`Last Nick`, `Address`, `Auth`) VALUES(' $+ $2 $+ ', ' $+ %whoami.addr $+ ', ' $+ $3 $+ ')
      $mysql(query,mysql %a)
      unset %whoami.*
      .notice $2 whoami >> You, $2 ( $+ $3 $+ ) are now recognized!
    }
  }
}
raw 318:*:{
  if (%whoami.auth) {
    .notice $2 whoami >> You must first authenticate with AuthServ/NickServ before using this command.
    unset %whoami.*
  }