tglogo.png
0 LIKES

Snippet


Nick Change History Logger

In Category Buzzen Posted by err0r On 01/07/16
Tags: buzzen err0r nick change log 

Use this snippet on Buzzen to log nickname history
menu channel {
  Nick History
  .$iif($istok(%nickhistorychannels,$chan,44),$style(1)) Log $chan : {
    $iif($istok(%nickhistorychannels,$chan,44),set %nickhistorychannels $remtok(%nickhistorychannels,$chan,1,44),set %nickhistorychannels $addtok(%nickhistorychannels,$chan,44))
  }
  .-
  .Log Room : lognicks $chan
}
on !*:Join:*: { 
  if ($left($nick,1) == >) { halt }
  var %s buzzen $+ .Log
  if ($istok(%nickhistorychannels,$chan,44)) {
    if (%history.flood. [ $+ [ $chan ] ] == on) { halt }
    set -eu3 %history.flood. [ $+ [ $chan ] ] on
    ; If Account Saved
    var %r $qt($mircdirhistory. $+ buzzen $+ .txt)
    var %addr $naddy($nick) 
    if (%addr == $gettok($read(%r, w,* $+ %addr $+ *),1,32)) {
      var %samenick
      var %hs 1
      var %his $gettok($read(%r,$readn),2,32)
      while ($gettok(%his,%hs,44)) {
        if ($regsubex($nick, /[0-9]+$/gi,$null) == $v1) { var %samenick $nick }
        inc %hs
      }
      if (%samenick != $nick) {
        if (!$istok($gettok($read(%r,$readn),2,32),$nick,44)) { 
          echo $chan [Nick Change] ---------------------------------------------------------------------------------------
          echo $chan  $+ $nick has made a nick change. Previous $iif($gettok($gettok($read(%r,$readn),2,32),2,44),nicks have been,nick was) $sorttok($gettok($read(%r,$readn),2,32),44,c)
          echo $chan -----------------------------------------------------------------------------------------------------
        }
        if ($numtok($gettok($read(%r,$readn),2,32),44) >= 11) { write -l $readn %r %addr $addtok($deltok($gettok($read(%r,$readn),2,32),1,44),$nick,44)  }
        else { write -l $readn %r %addr $addtok($gettok($read(%r,$readn),2,32),$nick,44) }
      }
      unset %samenick
    }
    ; Add Account
    else {
      echo $chan  $+ $chr(91) $+ $nick Logged $+ $chr(93)
      write %r %addr $nick
    }
  }
}
alias lognicks {
  var %a 1
  var %r $qt($mircdir\history. $+ buzzen $+ .txt)
  while ($nick($1,%a)) {
    var %n $nick($1,%a)
    if (%n != $me) {
      var %addr $naddy(%n)
      if (%addr == $gettok($read(%r, w,* $+ %addr $+ *),1,32)) {
      }
      else { 
        write %r %addr %n
      }
    }
    inc %a
  }
}
alias naddy {
  var %n $numtok($ial($1).user,46)
  if (%n isnum 1-3) { return $gettok($ial($1).user,%n,46) }
  else { return $ial($1).user }
}


Comments 12

danger - Thursday, 12 November, 2020
//raw ACCESS $active ADD DENY err0rstotle*!*@* 0 :ban that wraskly wabbit
err0r - Sunday, 1 November, 2020
You should have already who'ed room before this else you wouldn't be able to ban or anything else.
danger - Sunday, 1 November, 2020
else you will not have the persons gate to do it
danger - Sunday, 1 November, 2020
you might also want to change " .Log Room : lognicks $chan" to " .Log Room : .raw WHO $chan | .timerdolog -co 1 2 lognicks $chan"
danger - Sunday, 1 November, 2020
also %samenick should be declared at top of script as it stands currently its gonna = nick or whatever that vars value is globally

Please note that on our website we use cookies necessary for the functioning of our website, cookies that optimize the performance. To learn more about our cookies, how we use them and their benefits, please read our Cookie Policy.
I Understand