Jump to content
chain

Advanced User stats + Seen Database [BOT]

Recommended Posts

  • Administrators
  • Will work in any channel the BOT is on...
  • It's written ( and working ) on mIRC Ver. 6.35
  • Includes UserDB ( Tracks words, lines and characters ), !SEEN and AWAY system
  • Will notice user of other user being AWAY
    Meaning if anyone types a that's currently AWAY
    the bot will tell you how long since he/she went AFK and why / reason ( if a reason is given that is )
    NOTE: This doesn't work if your highlighting yourself... only works when other users "check"

 

;*** Downloaded from Hawkee - http://www.hawkee.com/snippet/8545/
on *:TEXT:*:#:mEvent_Scan $strip($1-)
on *:ACTiON:*:#:mEvent_Scan $strip($1-)
on *:JOiN:#:mEvent_Scan $strip($1-)
on *:PART:#:mEvent_Scan $strip($1-)
on *:KICK:#:mEvent_Scan $strip($1-)
on *:BAN:#:mEvent_Scan $strip($1-)
on *:UNBAN:#:mEvent_Scan $strip($1-)
on *:MODE:#:mEvent_Scan $strip($1-)
on *:RAWMODE:#:mEvent_Scan $strip($1-)
on *:TOPiC:#:mEvent_Scan $strip($1-)
on *:QUiT:mEvent_Scan $strip($1-) | UserDB
on *:NiCK:mEvent_Scan $newnick

;************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
on *:START:UserDB
on *:EXiT:UserDB
on *:DiSCONNECT:UserDB
;************************************************************************************************************************
alias UserDB {
  if ($event == Start) { if (!$hget(UserDB)) { hmake UserDB 1000 } | if ($isfile(SRU\Users\UserDB.hsh)) { hload UserDB SRU\Users\UserDB.hsh } }
  elseif (($event == Text) || ($event == Exit) || ($event == Quit) || ($event == Disconnect)) && ($hget(UserDB)) { hsave UserDB SRU\Users\UserDB.hsh | $iif($event == Text,msg # I've saved the User Database or updated if it... same same... but different) }
}
;******************************************************************************************
;*** Output section *** Output section *** Output section *** Output section ***
;******************************************************************************************
;*** Nicknames - Used to color nick-names
alias mNiCK { return $+(13,$1-,) }
;*******************************************************************************
;*** Channel - Used to color channels
alias mCHAN { return $+(3,$1-,) } 
;*******************************************************************************
;*** Network - Used to color networks
alias mNetC { return $+(14,$1-,) } 
;*******************************************************************************
;*** "NUMBERs" - Used to color number output
alias mNUM { return $+(04,$1-,) }
;*******************************************************************************
;*** START "BRACKET" - Used to make a start "bracket" in a output line
alias mSTART return 15ooO(
;*******************************************************************************
;*** END "BRACKET" - Used to end a start "bracket" in a output line
alias mEND return 15)
;*******************************************************************************
;*** SPACER - User as a spacer inbetween random "stats"
alias mSPACE return 14-5#14-
;******************************************************************************************

;******************************************************************************************
;***                 DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOiNG                    ***
;******************************************************************************************
;*** Seen - Used to change output when doing !SEEN
alias mReplaceSEEN return $+($replacex($1-,SCREW,screwing,fark,f*cking,RAPE,raping,MOLEST,molesting,SLAP,slaping,SWAFFEL,swaffeling,SEEN,looking for13,$+(iDLE,$chr(32)),doing a idle check on 13,$+(PiNG,$chr(32)),$+($mCMDS(!PiNG),'iNG) 13,$+(USER,$chr(32)),doing a $mCMDS(!User) check on 13,$+(IRCStats,$chr(32)),checking IRCStats for 13,$+(KiCK,$chr(32)),tossing 13,$+(UNBAN,$chr(32)),unbanning 13,$+(BAN,$chr(32)),banning 13,TEXT,writing,ACTiON,acting,JOiN,entering,PART,leaving,QUiT,quitting,TOPiC,changing topic to,RAWMODE,setting usermode,MODE,changing mode to),)
;*** Time - Used to change time output when doing !SEEN
alias mReplaceCTiME return $replacex($duration($calc($ctime -$1)),WKS,weeks,WK,week,DAYS,days,DAY,day,MiNS,minutes,MiN,minute,SECS,seconds,SEC,second)
;*** StatsDB - Used to replace special characters in niks before attempting to save DB
alias mReplaceStatsDB return $replace($remove($strip($1),[,],<,>,@,~,&,%,+),[,@,],~,|,-)
;*** Nick - Used to get usermodes on channel
alias mReplaceNiCK return $+($iif($left($nick(#,$nick).pnick,1) != $left($nick,1),$remove($left($nick(#,$nick).pnick,1),$nick)),$nick)
;******************************************************************************************
alias mEvent_Scan { 
  ;************************************************************************************************************************
  ;*** !Login - Used to set to current vHost
  if ($event == TEXT) && ($istok(!LOGiN,$1,32)) && ($hget(UserDB,$address($nick,2)) != $nick) { set -u1 %Event-MSG Changed nick from $v1 to $nick | var %nc = $addtok($ial($newnick).mark,$nick,32) | .ialmark $nick %nc | hadd -m UserDB $wildsite %nc | hsave UserDB SRU\Users\UserDB.hsh | .notice $nick [7UserDB] Updated - %Event-MSG }
  elseif ($event == TEXT) && ($istok(!LOGiN,$1,32)) { msg # Your host is already set to $nick - 4Note This isn't to change your nick... but to change your vHost to current nick }
  ;*** !NewNick - I forgot why I coded this... but will allow you to change you're vHost to other nick then currently using
  elseif ($event == TEXT) && ($istok(!NEWN !NEWNiCK,$1,32)) && ($hget(UserDB,$address($nick,2))) { set -u1 %Event-MSG Changed nick from $v1 to $2 | var %nc = $addtok($ial($newnick).mark,$2,32) | .ialmark $2 %nc | hadd -m UserDB $wildsite %nc | hsave UserDB SRU\Users\UserDB.hsh | .notice $nick [7UserDB] Updated - %Event-MSG }
  ;*******************************************************************************************************************************
  ;*** Check Status - Used to make sure it doesn't try to write when it's already writing
  if (%TEXT-NiCK) { return }
  ;*******************************************************************************************************************************
  ;*** Already added? - Checking to see if nick is already added (Using adress/vHost/$wildsite) (If it isn't found in the hash tables it will add for later use)
  elseif (!$hget(UserDB,$address($nick,2))) { var %Adress = $addtok($ial($newnick).mark,$nick,32) | .ialmark $nick %Adress | hadd -m UserDB $wildsite %Adress }
  ;*******************************************************************************************************************************
  ;*** Setting nick - Checking UserDB.hsh for the correct nick
  var %Event-NiCK $hget(UserDB,$address($nick,2)), %TEXT-NiCK $replacex(%Event-NiCK,[,@,],~,|,-)
  ;*******************************************************************************************************************************
  $iif($isdir($mircdir\SRU) == $false,mkDir $mircdir\SRU) | $iif($isdir($mircdir\SRU\Users) == $false,mkDir $mircdir\SRU\Users)
  ;*******************************************************************************************************************************
  ;*** #     #                                                                   ####### ####### #######    #    #       
  ;*** #     #  ####  ###### #####      ####  #####   ##   #####  ####              #    #     #    #      # #   #       
  ;*** #     # #      #      #    #    #        #    #  #    #   #                  #    #     #    #     #   #  #       
  ;*** #     #  ####  #####  #    #     ####    #   #    #   #    ####              #    #     #    #    #     # #       
  ;*** #     #      # #      #####          #   #   ######   #        #             #    #     #    #    ####### #       
  ;*** #     # #    # #      #   #     #    #   #   #    #   #   #    #             #    #     #    #    #     # #       
  ;***  #####   ####  ###### #    #     ####    #   #    #   #    ####              #    #######    #    #     # ####### 
  ;*******************************************************************************************************************************
  ;*** START DATE/DAY + TiME *****************************************************************************************************
  if (!$readini($+(SRU\Users\,%TEXT-NiCK,.ini),iNFO,STARTDATE)) { writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) iNFO STARTDATE $fulldate | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) iNFO STARTTiME $ctime | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) iNFO STARTDAY $day | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY DAY $date | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY TiME $ctime }
  ;*** DATE TODAY SECTiON ********************************************************************************************************
  elseif ($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,DAY) != $date) { remini $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY DAY $date | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY TiME $ctime }
  ;*******************************************************************************************************************************
  if ($event == JOiN) && (%PART- [ $+ [ $+($network,$chan) ] ] == %TEXT-NiCK) { writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY Hops $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,Hops) +1) | $iif($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,PARTs) <= 1,remini $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY PARTs,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY PARTs $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,PARTs) -1)) | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL Hops $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,Hops) +1) | $iif($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,PARTs) <= 1,remini $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL PARTs,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL PARTs $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,PARTs) -1)) | goto END }
  elseif ($event != TEXT && $event != ACTiON) && ($readini($+(SRU\Users\,%TEXT-NiCK,.ini),iNFO,STARTDATE)) { $iif($event == PART,set -u7 %PART- [ $+ [ $+($network,$chan) ] ] %TEXT-NiCK) | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY $+($upper($event),s) $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,$+($upper($event),s)) +1) | writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL $+($upper($event),s) $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,$+($upper($event),s)) +1) | goto END }
  ;*******************************************************************************************************************************
  ;****** Total ( Words, Lines & Characters )
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL Words $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,Words) +$0)
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL Lines $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,Lines) +1)
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TOTAL Characters $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TOTAL,Characters) +$len($remove($1-,$chr(32))))
  ;*** Today ( Words, Lines & Characters )
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY Words $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,Words) +$0)
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY Lines $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,Lines) +1)
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) TODAY Characters $calc($readini($+(SRU\Users\,%TEXT-NiCK,.ini),TODAY,Characters) +$len($remove($1-,$chr(32))))
  ;*** END UserDB SECTiON ********************************************************************************************************
  ;*******************************************************************************************************************************
  ;*** AWAY SECTiON
  if ($remove($strip($1),!,@,.,+,-) == AWAY) || ($remove($strip($1),!,@,.,+,-) == AFK) || ($remove($strip($1),!,@,.,+,-) == BRB) || ($remove($strip($1),!,@,.,+,-) == BBL) || ($remove($strip($1),!,@,.,+,-) == TTYL) { $iif(!$readini(SRU\StatsDB.ini,$replace($nick,[,@,],~,|,-),AWAY),msg # $+(13,$nick,) is now marked as $+(3,AWAY,) $+(15ooO,$chr(40),) As in not here... $+(15,$chr(41),),$iif(!$2,return,.notice $nick Your $+(3,AWAY,) messages has been "updated" to -> $2-)) | writeini -n SRU\StatsDB.ini $replace($nick,[,@,],~,|,-) AWAY $ctime | writeini -n SRU\StatsDB.ini $replace($nick,[,@,],~,|,-) AWAYre $iif(!$2,N/A as in Not Available,$2-) }
  ;*** BACK / BaK
  elseif ($readini(SRU\StatsDB.ini,$replace($nick,[,@,],~,|,-),AWAY)) && ((BACK isin $strip($1-)) || (BAK isin $strip($1-)) || ($calc($ctime -$readini(SRU\StatsDB.ini,$replace($nick,[,@,],~,|,-),AWAY)) >= 600)) { set -u1 %T $v1 | $iif(!$timer($+(Back,$network,$chan)),msg # $+(13,$nick,) is now $+(03,$iif(BaK isin $1-,BAK,BACK),) $+(15ooO,$chr(40),) As in back at keyboard... $+(15,$chr(41),),.notice $nick Welcome back $+(13$nick,) you're no longer marked as $+(3AWAY)) | remini SRU\StatsDB.ini $replace($nick,[,@,],~,|,-) AWAY | remini SRU\StatsDB.ini $replace($nick,[,@,],~,|,-) AWAYre | $+(.timer,Back,$network,$chan) 1 5 noop }
  ;*** NOTE <NiCK> is AWAY
  elseif (!$timer($+(Away,$network,$chan))) && (($readini(SRU\StatsDB.ini,$mReplaceStatsDB($1),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($2),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($3),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($4),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($5),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($6),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($7),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($8),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($9),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($10),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($11),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($12),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($13),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($14),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($15),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($16),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($17),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($18),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($19),AWAYre)) || ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($20),AWAYre))) { $+(.timer,Away,$network,$chan) 1 4 noop | set -u1 %RE $v1
    if ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($1),AWAY)) { set -u1 %X $1 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($2),AWAY)) { set -u1 %X $2 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($3),AWAY)) { set -u1 %X $3 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($4),AWAY)) { set -u1 %X $4 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($5),AWAY)) { set -u1 %X $5 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($6),AWAY)) { set -u1 %X $6 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($7),AWAY)) { set -u1 %X $7 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($8),AWAY)) { set -u1 %X $8 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($9),AWAY)) { set -u1 %X $9 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($10),AWAY)) { set -u1 %X $10 }
    elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($11),AWAY)) { set -u1 %X $11 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($12),AWAY)) { set -u1 %X $12 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($13),AWAY)) { set -u1 %X $13 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($14),AWAY)) { set -u1 %X $14 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($15),AWAY)) { set -u1 %X $15 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($16),AWAY)) { set -u1 %X $16 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($17),AWAY)) { set -u1 %X $17 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($18),AWAY)) { set -u1 %X $18 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($19),AWAY)) { set -u1 %X $19 } | elseif ($readini(SRU\StatsDB.ini,$mReplaceStatsDB($20),AWAY)) { set -u1 %X $20 }
    $iif($strip(%X) != $nick,msg # [4NOTE] $+(13,$nick,) -> Currently $+(04,$replacex($duration($calc($ctime -$readini(SRU\StatsDB.ini,$mReplaceStatsDB(%X),AWAY))),WKS,weeks,WK,week,DAYS,days,DAY,day,MiNS,minutes,MiN,minute,SECS,seconds,SEC,second),)) since $+(13,$nick(#,$nick(#,%X)),) went $+(3AFK) $+(15ooO,$chr(40),) %RE $+(15,$chr(41),))
  }
  ;**********************************************************************************************************************************************************************************************************************************************
  ;*** !SEEN
  elseif ($1 == !SEEN) && ($readini($+(SRU\Users\,$replace($iif(!$2,$nick,$strip($2)),[,@,],~,|,-),.ini),SEEN,LAST) != $null) && (!$timer($+(SeenSearch,$network,$nick))) {   $+(.timer,SeenSearch,$network,$nick) 1 3 noop | set -u1 %2 $replace($iif(!$2,$nick,$strip($2)),[,@,],~,|,-)
    msg # Last seen $mReplaceSEEN($iif($readini($+(SRU\Users\,%2,.ini),SEEN,ACTiON) != $null,$v1 $+($readini($+(SRU\Users\,%2,.ini),SEEN,ViCTiM),),$iif($istok(%ChanHiDDEN,$readini($+(SRU\Users\,%2,.ini),SEEN,CHAN),32) && $readini($+(SRU\Users\,%2,.ini),SEEN,CHAN) == $chan,$readini($+(SRU\Users\,%2,.ini),SEEN,DOiNG),$iif(!$istok(%ChanHiDDEN,$readini($+(SRU\Users\,%2,.ini),SEEN,CHAN),32),$readini($+(SRU\Users\,%2,.ini),SEEN,DOiNG),$readini($+(SRU\Users\,%2,.ini),SEEN,LAST))))) $&
      $iif($readini($+(SRU\Users\,%2,.ini),SEEN,CHAN) && $readini($+(SRU\Users\,%2,.ini),SEEN,CHAN) != $chan,$iif($readini($+(SRU\Users\,%2,.ini),SEEN,LAST) != PART && $readini($+(SRU\Users\,%2,.ini),SEEN,LAST) != JOiN,inside) $mCHAN($readini($+(SRU\Users\,%2,.ini),SEEN,CHAN))) $iif($readini($+(SRU\Users\,%2,.ini),SEEN,WHERE) != $network,on $mNetC($v1)) $iif($readini($+(SRU\Users\,%2,.ini),SEEN,REASON),$v1) $&
      15ooO( $iif($readini($+(SRU\Users\,%2,.ini),SEEN,DATE) != $day $date(dd/mm/yyyy),$mDATE($v1) like) $mNUM($mReplaceCTiME($readini($+(SRU\Users\,%2,.ini),SEEN,TiME)) ago) $iif($readini($+(SRU\Users\,%2,.ini),LAST,$network) && $readini($+(SRU\Users\,%2,.ini),SEEN,WHERE) != $network,$mSPACE Last seen on $mNetC($network) like $mNUM($duration($calc($ctime -$readini($+(SRU\Users\,%2,.ini),LAST,$network))) ago)) 15)
  }
  ;***************************************************************************************************************************************************
  ;*** !IRCStats
  elseif ($1 == !U) || ($1 == !USER) || ($1 == !IRCSTATS) {
    ;*****************************************************************************
    ;*** SETTiNG NiCK
    set -u1 %2 $iif(!$2,$nick,$iif($strip($2) ison $chan,$nick(#,$nick(#,$v1)),$iif($readini($+(SRU\Users\,$strip($2),.ini),SEEN,LAST),$strip($2),$nick))))
    set -u1 %L $readini($+(SRU\Users\,$replace(%2,[,@,],~,|,-),.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Lines)
    ;***************************************************************************************************************************************************************************************************************************************
    if (!$readini($+(SRU\Users\,%2,.ini),SEEN,LAST)) { msg # Sorry $+($mNiCK($nick),...) I've got no date on $mNiCK(%2) $iif(%2 ison $chan,but he/she right here inside $mCHAN(#)) | goto END }
    ;***********************************************************************************************************************
    ;******* User Level / Class 
    ;*** 176400
    elseif ($strip(%L) >= $calc(420*420)) { set -u1 %Y 9Class 8Sage | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 04420 034209s }
    ;*** 105000
    elseif ($strip(%L) >= $calc(420*250)) { set -u1 %Y 9Class 8Ancient | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 04250 034209s }
    ;*** 42000
    elseif ($strip(%L) >= $calc(420*100)) { set -u1 %Y 9Class 8Idol | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 04100 034209s }
    ;*** 21000
    elseif ($strip(%L) >= $calc(420*50)) { set -u1 %Y 9Class 8Icon | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0450 034209s }
    ;*** 12600
    elseif ($strip(%L) >= $calc(420*30)) { set -u1 %Y 9Class 8Elite | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0430 034209s }
    ;*** 8400
    elseif ($strip(%L) >= $calc(420*20)) { set -u1 %Y 9Class 14Legend | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0420 034209s }
    ;*** 6300
    elseif ($strip(%L) >= $calc(420*15)) { set -u1 %Y 9Class 15Veteran | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0415 034209s }
    ;*** 5880
    elseif ($strip(%L) >= $calc(420*14)) { set -u1 %Y 9Class 14Meth Lab Manager | set -u1 %Y+ at least $+(04,$v2) 14lines 15aka 0414 034209s }
    ;*** 5460
    elseif ($strip(%L) >= $calc(420*13)) { set -u1 %Y 9Class 15Meth Lab Assistant | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0413 034209s }
    ;*** 5040
    elseif ($strip(%L) >= $calc(420*12)) { set -u1 %Y 9Class 15Thug | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0412 034209s }
    ;*** 4620
    elseif ($strip(%L) >= $calc(420*11)) { set -u1 %Y 9Class 15Saboteur | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0411 034209s }
    ;*** 4200
    elseif ($strip(%L) >= $calc(420*10)) { set -u1 %Y 9Class 3Informant | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 0410 034209s }
    ;*** 3780
    elseif ($strip(%L) >= $calc(420*9)) { set -u1 %Y 9Class 3Gang Member | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 049 034209s }
    ;*** 3360
    elseif ($strip(%L) >= $calc(420*8)) { set -u1 %Y 9Class 14Gang Recruit | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 048 034209s }
    ;*** 2940
    elseif ($strip(%L) >= $calc(420*7)) { set -u1 %Y 9Class 15Thief | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 047 034209s }
    ;*** 2520
    elseif ($strip(%L) >= $calc(420*6)) { set -u1 %Y 9Class 15Shoplifter | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 046 034209s }
    ;*** 2100
    elseif ($strip(%L) >= $calc(420*5)) { set -u1 %Y 9Class 15Mugger | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 045 034209s }
    ;*** 1680
    elseif ($strip(%L) >= $calc(420*4)) { set -u1 %Y 9Class 15Purse Snatcher | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 044 034209s }
    ;*** 1260
    elseif ($strip(%L) >= $calc(420*3)) { set -u1 %Y 9Class 15Pickpocket | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 043 034209s }
    ;*** 840
    elseif ($strip(%L) >= $calc(420*2)) { set -u1 %Y 9Class 15Civilian 15(8User15) | set -u1 %Y+ at least $+(04,$v2,) 14lines 15aka 042 034209s }
    ;*** 420
    elseif ($strip(%L) >= 420) { set -u1 %Y 9Class 15Civilian 15(8New User15) | set -u1 %Y+ at least $+(04,$v2,) 14lines }
    ;*** Lower then 420
    elseif ($strip(%L) < 420) { set -u1 %Y 9Class 14Scammer 15(8New User15) | set -u1 %Y+ less then $+(04,$v2,) 14lines }
    ;*****************************************************************************************************************************************************
    set -u1 %X $iif(!$2,$nick,$iif($strip($2) ison $chan,$nick(#,$nick(#,$v1)),$iif($readini($+(SRU\Users\,$strip($2),.ini),SEEN,LAST),$strip($2),$nick))))
    $iif(%Y+,set %Y+ $+(15,$chr(40),14Awarded to users with $v1,15,$chr(41))) 
    set -u1 %I $readini($+(SRU\Users\,%2,.ini),iNFO,iAM)
    set -u1 %Z $+(9,Last seen $iif($readini($+(SRU\Users\,%2,.ini),SEEN,CHAN) && $readini($+(SRU\Users\,%2,.ini),SEEN,CHAN) != $chan,inside $mCHAN($v1)) $iif($readini($+(SRU\Users\,%2,.ini),SEEN,WHERE) != $network,on $mNetC($v1)),) $&
      $iif($readini($+(SRU\Users\,%2,.ini),SEEN,DATE) != $day $date(dd/mm/yyyy),like) $mNUM($mReplaceCTiME($readini($+(SRU\Users\,%2,.ini),SEEN,TiME)) ago) $iif($readini($+(SRU\Users\,%2,.ini),SEEN,DATE) != $day $date(dd/mm/yyyy),$mSPACE $+($replace($v1,day,day14,/,15/14),))) $&
      $iif($readini($+(SRU\Users\,%2,.ini),LAST,$network) && $readini($+(SRU\Users\,%2,.ini),SEEN,WHERE) != $network,$mSPACE Last seen on $mNetC($network) like $mNUM($duration($calc($ctime -$readini($+(SRU\Users\,%2,.ini),LAST,$network))) ago)) 
    ;**********************************************************************************************************************************************************************************************************************************************
    msg # 9[ $+(03,%X) $+(9],$iif(%I,:[ $+(09,$v1) 9]),:-:[) %Y $replace($remove(%Y+,$chr(41)),$chr(40),$+($mSPACE,$chr(32))) $+(9],$iif(%Z,:[ $+(09,$v1) 9]),)
    $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Words),msg # 9Has written $mNUM($v1) 9words $&
      $+($chr(40),9Avg. $mNUM($round($calc($iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Words) > $readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Characters),$v1 / $v2,$v2 / $v1)),2)),$chr(41)) $&
      9in $mNUM($iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Lines),$v1,0)) 9lines $&
      $+($chr(40),9Avg. $mNUM($round($calc($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Words) / $readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Lines)),2)),$chr(41)) $&
      9with $mNUM($iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Characters),$v1,0)) 9characters... $&
      $iif($strip($3) == TOTAL,[14STATS] $+($iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Joins),$mNUM($v1) $+(9join,$iif($v1 >= 2,s))) $&
      $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Parts),$mNUM($v1) $+(9part,$iif($v1 >= 2,s))) $&
      $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Hops),$mNUM($v1) $+(9hop,$iif($v1 >= 2,s))) $&
      $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Kicks),$mNUM($v1) 9kicked) $&
      $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Banns),$mNUM($v1) 9banned) $&
      $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),UN-Banns),$mNUM($v1) 9un-banned) $&
      $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Modes),$mNUM($v1) $+(9mode,$iif($v1 >= 2,s))) $&
      $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),uModes),$mNUM($v1) $+(9usermode,$iif($v1 >= 2,s))) $&
      $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Topics),$mNUM($v1) $+(9topic,$iif($v1 >= 2,s))) $&
      $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Quits),$mNUM($v1) $+(9quit,$iif($v1 >= 2,s))) $&
      $iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Actions),and $mNUM($v1) $+(9action,$iif($v1 >= 2,s))),)))
    ;**********************************************************************************************************************************************************************************************************************************************
  }
  ;**********************************************************************************************************************************************************************************************************************************************
  :END
  ;******
  unset %Y %Y+ %I %Z %X %L
  ;***********************
  ;*** LAST SECTiON
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) LAST SEEN $ctime
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) LAST $upper($event) $ctime
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) LAST $network $ctime
  $iif($chan != $null,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) LAST $+($network,$chan) $ctime)
  ;*** SEEN SECTiON
  .remini $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN LAST $upper($event)
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN TiME $ctime
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN DATE $day $date(dd/mm/yyyy)
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN WHERE $network
  $iif($chan != $null,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN CHAN $chan)
  $iif($chan != $null,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN NiCK $mReplaceNiCK($nick))
  ;*************************************************************************************************
  if ($event == PART) || ($event == QUiT) writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN REASON $iif($event == QUiT,$iif($3,$strip($3-),QUiT),$iif($event == PART,$iif($1,$strip($1-),N/A)))
  ;*************************************************************************************************
  writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN DOiNG $upper($event) $iif($event == QUiT,$iif($3,$strip($3-),QUIT),$iif($event == PART,$iif($1,$strip($1-),N/A),$iif($event == BAN,$bnick,$iif($event == UNBAN,$bnick,$iif($event == KiCK,$knick $strip($1-),$strip($1-))))))
  ;******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
  if ($event == ACTiON) && ((rape isin $strip($1)) || (molest isin $strip($1)) || (fark isin $strip($1)) || (SCREW isin $strip($1)) || (slap isin $strip($1)) || (thank isin $strip($1)) || (swaffel isin $strip($1))) {
    writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN ACTiON $v1
    $iif($remove($strip($2),:,>,<,!,?) ison $chan,writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN ViCTiM $nick(#,$nick(#,$v1)))
  }
  ;************************************************************************************************************
  elseif ($event == TEXT) && ((!SEEN isin $strip($1)) || (!iDLE isin $strip($1)) || (!PiNG isin $strip($1)) || (!USER isin $strip($1)) || (!U isin $strip($1)) || (!IRCStats isin $strip($1))) {
    writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN ACTiON $iif($1 != !U,$remove($v1,!),USER)
    writeini -n $+(SRU\Users\,%TEXT-NiCK,.ini) SEEN ViCTiM $iif($remove($strip($2),:,>,<,!,?) ison $chan,$nick(#,$nick(#,$v1)),$iif(!$2,$nick,$remove($strip($2),:,>,<,!,?)))
  }
  ;***********************************************************************************************************************************************************
  unset %TEXT-NiCK %Event-NiCK
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...