Advanced User stats + Seen Database [BOT]

By SRU on Apr 10, 2011

[size=14]Advanced User stats + Seen Database ( Intended for a bot... )[/size]

  • 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"

AWAY System:

When I say intended for a BOT I mean it only works for other people...
Will not work for the one running the script... but for the people using your BOT / rooms.


  1. ALT+R ( - in mIRC / Goto Remote )
  2. Copy and paste the code below ( into a new file unless you know what you are doing )
  3. Enjoy ?

Will save stats ( such as text, words and characters written ) to personal .ini-files ( one for each user )
And for the AWAY / AFK added... you type AFK, BRB, BBL, TTYL or AWAY to activate and BACK or BAK to deactivate

Included !SEEN... which works by doing !SEEN
Included !USER... which works by doing !USER

  • Added all the events that I could think of so that it will now track everything ( that I can think of )
  • Included aliases in the top of the file so you can easily switch colours in the hole script
    mNiCK and mNUM will colour either NiCK-NAMEs or NUMBERs

Ive' changed it to run on vHost(s) instead...
New commands:
!Login - Used to change vHost to current
!NewNick - Used to change nick

  • If you find any problems... let Me know and I'll get right on it ;)

If you are... A fellow stoner... Danish... Cultivator... Crazy about weed...
Got any pictures of your own strain / lovely females...
Got free weed... Want to chill... Wanna hang out...
Found bugs... Need help with one of My script...

Includes UserDB ( !IRCStats - Tracks words, lines, characters + all events I can think of ), !SEEN and AWAY system

;*** Downloaded from Hawkee -
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
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 ********************************************************************************************************
  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))),)))
  unset %Y %Y+ %I %Z %X %L
  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)
  .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


Sign in to comment.
ovelayer   -  Sep 25, 2014

You should add top10 to it and the ability to exclude/ignore nicks/hosts

H0LLYWOODIRC   -  Jun 09, 2014

now i dont know if this is even a active snippet anymore, but, i do like this script a lot. what i'm looking for in a stats script is the ability to combine all nicks used from a specific user@host. If its even possible at all. so far i've had no luck. and manually combining values is time consuming and ridiculous lol. hope someone can help me out. good luck out there.

SRU  -  Sep 22, 2014

I'll have a look at changing it to user@host if you're still looking ?

H0LLYWOODIRC  -  Oct 11, 2014

I am absolutely still interested in having that changed. Thanks alot and i hope your still looking at this. :)
Ill also be joining the server. So you can drop me a PM on there as well when i'm connected. Thank You.

Sign in to comment

cptpan   -  Sep 28, 2013

I assume you wrote this for a black background, because on white, the colour scheme is terrible.

SRU  -  Sep 22, 2014

Yeah... all My scripts are written for black background

Yawhatnever  -  Sep 22, 2014

You could use $color() rather than hardcoding the colors so that people can use it and it will look normal with their themes.

SRU  -  Sep 22, 2014

Not sure how to go about that... never used $color
Could you give an example ?

I can see I've added the ability to change colors to whatever under Output section
But can see the user classes haven't got that option :/

Yawhatnever  -  Sep 22, 2014
//echo -ag info: $color(info text) - normal: $colo(normal text)
SRU  -  Sep 22, 2014

Might be Me that's high... but that didn't help Me much

Yawhatnever  -  Sep 23, 2014

It returns the number for the color name set in the colors dialog (the crayon button in the toolbar). /help $color

Sign in to comment

Shadnire   -  Apr 12, 2013

What are all of the commands on this? I tried using !top10 but it didn't work for me, for example.

SRU  -  Apr 12, 2013

There isn't added any TOP-10 for this.
Commands are: !Seen and !IRCStats

  • AFK section that works on AFK/BRB/BBL/TTYL and back/BaK
Sign in to comment

ovelayer   -  Mar 05, 2013

i found a nick your script doesn't like
i have a user with the nick aux
and i get * /writeini: error accessing file 'C:\L00ker\SRU\Users\AUX.ini' (line 129, seen2)
also if i may
when i do !top10 it shows the top10 users with the most written lines..
how can i change that to display the top10 words instead without having to do !top10 words

SRU  -  Mar 05, 2013

That makes no sense to Me...
shouldn't be and error no mater what nick and especially not on aux that hasn't got any special characters.

But easy fix with TOP10
replace line 31 in the TOP 10

else { set -u7 %TOP-STATS TEXT | set -u7 %TOP-STATS+ $iif(Word isin $1-2,Words,$iif(Char isin $1-2,Characters,Lines)) }


else { set -u7 %TOP-STATS TEXT | set -u7 %TOP-STATS+ $iif(Line isin $1-2,Lines,$iif(Char isin $1-2,Characters,Words)) }
ovelayer  -  Mar 05, 2013

with that fix now i get
TOP-20-LOCATION Unknown command

TOP-20 Unknown command
but it does diplay top10 words now lol
how to i remove the part when the bot joins the channel it msg's the chan the topic set by?
i don't want it to do that

it was my bot not the script..guess i fried it had to rebuild..sorry

SRU  -  Mar 06, 2013

I'm confused... but above "fix" shouldn't be causing any trouble unless I've mistaken the line number.
But let Me know and I'll edit it tomorrow and post the fix... right now heading of to bed after I finish making a mix.

ovelayer  -  Mar 06, 2013

yes it was that line when i replace it with your new one i get the top20 error posted above..when i replace that line with the one just above the posted fix i also get top20 errors...
but when i replace the alias with the orig everything works again
so not sure if its the wrong line or there is an error in the code...
oh and yes replacing the line does make it show the top words but it doesnt update with new counts just stays the same
and for the user that has the nick Aux i get this error

  • /writeini: error accessing file 'C:\searchbot\SRU\Users\AUX.ini' (line 129, script2)
    everytime he types in the channel
SRU  -  Mar 07, 2013

Must be error from here when copy/pasting then... I'll fix it in the pastebin tomorrow.
Heading of to bed now... and regarding the Aux error... only thing I can think of that might help it is deleting AUX.ini from the folder...
C:\searchbot\SRU\Users\AUX.ini and see if it keeps coming with errors... if so I don't know but will have a look threw the script if deleting it and trying again didn't work.
But will see if I can find what caused the problem to start with no mater what... but let Me know if deleting it didn't work.

ovelayer  -  Mar 07, 2013

there is no aux.ini
im guessing for some reason it is giving that error because it won't write the ini with that nick

SRU  -  Mar 10, 2013

Sorry for the late reply... My stomach has been hating Me all weekend.
Are you are sure the file doesn't exists ? You have checked the folder to see if it's there or not ?
Cause I've got no idea what would be causing it then... but will have a look at the script and fix the TOP-10 for you.

Don't know when I'll be up for looking threw this... hoping today... but won't promise anything.

Here is the TOP-10 with words instead of lines...
this should hopefully not give you any errors like when copy/pasting from here
EDiT 2:
Here is the database script... I haven't really changed anything here...
but please use this version and let Me know if it's line 130 giving error now or which one is giving error.

ovelayer  -  Mar 10, 2013

no worries im just thankfull for your help.
yes i did check the folder and it doesn't seen to create the file..its weird
the new alias works great thank you very much!

i did find however i dont think the today stats are accurate.. =(
i think it just repeats the total stats
[12:49am] <!xXBERTOXx> !top10
[12:49am] <!L00ker> Gathering results...One moment please....
[12:49am] <!L00ker> [ TOP-10 ]-[ TOP-TEXTER(s) ] People with most written Words ->
[12:49am] L00ker #1 deathtoll (4099) #2 jaythepirate (3185) #3 Kamei_Eri (2768) #4 xXBERTOXx (2514) #5 wh33lman (2411) #6 Solinari (2283) #7 zener (1610) #8 dasj (1273) #9 tgp (1264) #10 VLDK (1003)
[12:49am] <!xXBERTOXx> !ttop10
[12:49am] <!L00ker> Gathering results...One moment please....
[12:50am] <!L00ker> [ TODAYs ]-[ TOP-TEXTER(s) ] People with most written Words ->
[12:50am] L00ker #1 deathtoll (4057) #2 jaythepirate (3185) #3 Kamei_Eri (2768) #4 xXBERTOXx (2515) #5 wh33lman (2411) #6 Solinari (2283) #7 zener (1610) #8 dasj (1273) #9 tgp (1264) #10 VLDK (1003)

SRU  -  Mar 10, 2013

Might be missing the reset... will look into that.

Reset isn't missing I can see... don't know why there isn't any more difference...
But you can always try removing/renaming 0-TODAY.ini from the TOP10 folder
and let it run for a moment and then check the !TTOP10 to see if it's there the error is.

ovelayer  -  Mar 10, 2013

it was still doing the same thing so i deleted the sru folder and am going to let it run until morning to see if it changes the stats over on a new day

ovelayer  -  Mar 10, 2013

so far using the new database script you gave me the bot crashes at 6 1/2 hrs

SRU  -  Mar 10, 2013

I haven't changed anything in the script besides make a new line for each of the write commands on 129
too see where the error you where getting on aux was exactly... so iDK why it's crashing for you now.
Am guess it's the same "error" as last where mIRC just crashes without any errors ?

ovelayer  -  Mar 10, 2013


SRU  -  Mar 11, 2013

This is just getting more weird.
Can you PM Me the server your on that most active ?
I'll logon with My Test Client and try fixing something that works for you and see if I can replicate any of the errors your getting.

I just remember I have to help a IRL friend move today... so once again not sure when it will be made.
But if you hook Me up with server address and IRC nick in a PM I'll logon and PM you on the IRC when I start looking at new version.

Sign in to comment

ovelayer   -  Mar 03, 2013

do you think i can see the copy of this script with alias's that u use..
does the top10 record stuff like actions and topics?
would really like to see what i can do on my end to get the full script running

SRU  -  Mar 04, 2013

Not sure what you mean ?
But My TOP10 tracks different words/commands...
plus the "normal" onces you've got in yours which is the same just removed above and edited to fit.

Don't think I'm saving topic... haven't got the command for pulling the iNFO anyways...
but am saving several stats that I haven't got the command for pulling out so possible...
list above is the stats I've got commands for pulling out... am saving more stats that I've yet to code output for.

Sign in to comment

ovelayer   -  Mar 01, 2013

hmm for some reason i don't think it is generating the right figures
[3:02pm] <!xXBERTOXx> !u
[3:02pm] <!l00ker> [ xXBERTOXx ]:-:[ Class Scammer (New User) -#- Awarded to users with less then 420 lines ]:[ Last seen 47seconds ago ]
[3:02pm] <!l00ker> Has written 12 words (Avg. 5) in 12 lines (Avg. 1) with 60 characters...
[3:02pm] <!xXBERTOXx> okay so lets test this
[3:02pm] <!xXBERTOXx> !u
[3:02pm] <!l00ker> [ xXBERTOXx ]:-:[ Class Scammer (New User) -#- Awarded to users with less then 420 lines ]:[ Last seen 4seconds ago ]
[3:02pm] <!l00ker> Has written 14 words (Avg. 5) in 14 lines (Avg. 1) with 70 characters...

shouldnt the amout of words be 17 now if it started with 12?
and characters doesnt seem right either

SRU  -  Mar 02, 2013

Yes it should... will look into it later on and fix the error @bandbonjtv found

SRU  -  Mar 02, 2013

This should do the trick for you @ovelayer
Should have FiXeD all the errors but let Me know

ovelayer  -  Mar 02, 2013

awsome...loading it now gonna let it run while i go do my sidejob and will let you know when i get home.
thanks for all your work

bandbonjtv  -  Mar 02, 2013

it never acted up on me...i got the right figures i think, i have 2 counters, so ill reset them both and see what happens later on today :) (using the script you posted before you edited for ovelayer

ovelayer  -  Mar 02, 2013

everything seems to be running a treat with the latest version!
thank you so much!!

SRU  -  Mar 02, 2013

Shouldn't be a problem for you since your running other version @bandbonjtv but let Me know.

Nicely nicely @ovelayer and sorry about that... had forgot re-write the section in the edit I made you.

Sign in to comment

ovelayer   -  Feb 28, 2013

yeah would really like to see the away system removed...
edited the rest of the script and everything seems to be running great now
cant way for the hsh version!!!
this version doesnt seem to be that accruate
[9:18pm] <!xXBERTOXx> !u deathtoll
[9:18pm] <!L00ker> [ deathtoll ]:-:[ Class Scammer (New User) -#- Awarded to users with less then 420 lines ]:[ Last seen inside #beast-chat 16minutes 52seconds ago ]
[9:18pm] <!L00ker> Has written 112 words (Avg. 5) in 112 lines (Avg. 1) with 560 characters...
[9:18pm] <!xXMASTERXx> PRE>> 2013-03-01 09:18:36 pm |::.MP3.::| DJHyperactive-_Slam_Radio021(Proton_Radio)-SBD-02-28-2013 (TALiON_INT)
[9:19pm] <!xXBERTOXx> !top10
[9:19pm] <!L00ker> [ TOP-10 ]-[ Words ->
[9:19pm] <!L00ker> #1 xXBERTOXx (106) #2 deathtoll (57) #3 Kamei_Eri (43) #4 Blahmy (43) #5 wh33lman (25) #6 DonnieB (15) #7 Nightman (14) #8 Paul (14) #9 akinix (14) #10 FannyChmelar8401802 (13)

SRU  -  Mar 01, 2013

Nicely nicely... and easy fix to remove the away section...
Just edit line 98 to if instead of elseif as it is now and then remove the away above

ovelayer  -  Mar 01, 2013

my line 98 has ;*** SEEN SECTiON
lol i just removed the notice parts and changed the channel msg to msg a nonexistent channel..
top10 works great now thanks!

Sign in to comment

bandbonjtv   -  Feb 28, 2013

thanks, great snippet

bandbonjtv  -  Feb 28, 2013

also, was wondering if there was a way to remove the afk/brb/bbl/ect stuff, i really only need just the stats can i isolate just the seen script? i already have a bitchin afk/brb/bbl/ect script that i use instead and this one interferes with it. other then that, i love every bit of this snippet

ovelayer  -  Feb 28, 2013

here is a version that he edited for me that has the notices removed for the away system

and yes don't change anything but the numbers

SRU  -  Feb 28, 2013

Here is a striped version of the script @bandbonjtv

bandbonjtv  -  Mar 01, 2013

thanks sru, but you didnt strip them all :) its ok tho, cuz i did in my copy. i still love the script but that darn away thing. it interferes with my current away system... oh, i also changed your away to check any word givin, not just bak/back for return from away.

;;replaced this to check any word for back from away

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 }

;;with this one

elseif ($readini(SRU\StatsDB.ini,$replace($nick,[,@,],~,|,-),AWAY)) && (($1 isin $strip($1-)) || ($1 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 }

;;i also think i found a typo

$iif($readini($+(SRU\Users\,%2,.ii),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Actions),and $mNUM($v1) $+(9action,$iif($v1 >= 2,s))),)))

;;should be (missspelled ini)

$iif($readini($+(SRU\Users\,%2,.ini),$iif($strip($3) == CHAN,$+($network,$chan),TOTAL),Actions),and $mNUM($v1) $+(9action,$iif($v1 >= 2,s))),)))

bandbonjtv  -  Mar 01, 2013

this is my away script, if you wanna intertwine them or something so i can delete my other script :) and keep yours

on $:text:/^(brb|bbl|afk|bbiab)\b/Si:#:awaycheck $1-
on $
:action:/^(brb|bbl|afk|bbiab)\b/Si:#:awaycheck $1-

alias -l awaycheck {
if ($2 == $null) { writeini away.ini $nick reason lurking | msg # $nick is now $readini(away.ini, $nick, reason) | writeini away.ini $nick away on | set %away [ $+ [ $nick ] ] on | set %time [ $+ [ $nick ] ] }
if ($2 != $null) { writeini away.ini $nick reason $remove($2-,$chr(36))
msg # $nick is now $readini(away.ini, $nick, reason)
writeini away.ini $nick away on | set %away [ $+ [ $nick ] ] on | set %time [ $+ [ $nick ] ]

if ($readini(away.ini, $nick, away) == on) inc -c %time [ $+ [ $nick ] ]

on :text::#:awaycheck2 $1-
on :action::#:awaycheck2 $1-

alias -l awaycheck2 {
if ($readini(away.ini, $nick, away) == on) {
msg # welcome back $nick $+ , Your excuse for leaving chat was: $readini(away.ini, $nick, reason) $+ : You were away from chat, $duration(%time [ $+ [ $nick ] ])
remini away.ini $nick | unset %away [ $+ [ $nick ] ] on | unset %time [ $+ [ $nick ] ] }

SRU  -  Mar 02, 2013

Thanks for spotting the error... will fix it later on and look into coding a version with your away instead.

The away script will activate on any words BTW after 10 minutes so people can reply after going AFK without having to go AFK again

SRU  -  Mar 02, 2013

Here My away is removed... but you'll have to wait to later for a version with your written into it @bandbonjtv
Have fixed the .ii error you found in this one also... but you'll have to strip the colors or copy/paste the one you already got in the version above for !seen / !user section to be color less

ovelayer  -  Mar 02, 2013

yes cause we like the :P

bandbonjtv  -  Mar 02, 2013

thanks again sru, i will add updated version and keep you updated

SRU  -  Mar 02, 2013

Sounds good :D

I might have a look at a edit with your away coded in it today... but no promises.

Sign in to comment

ovelayer   -  Feb 23, 2013

best stats and seen script out there..but unfortunately it causes the bot to crash after awhile
probably because of so any on events in big channels..
anyway to smooth this out so it can work with big chans and not cause the bot to crash?

SRU  -  Feb 23, 2013

I'll look into it but might take some time for Me to finish it.
What is a big channel ? Cause running more or less the same version on multiple channels across several networks without any trouble.

I've edited it a little... but doubt that it has speed-ed the script much up

ovelayer  -  Feb 23, 2013

any editing would prolly help i will keep updating the script as you post updates and relay my experiences..
i would really like to see this script as my daily user seen and stats script!

sence you did what you did 8hrs ago i loaded the updated script to my bot placed it in 6 chans with a total of 4500 chatty users and the bot hasnt crashed yet..thats a new record!!
awsome job..hope to see more updates!!
thank you

edit 2:
took about 20hrs but the bot finally crashed..
alot better performance then the orig but it does still crash...

SRU  -  Feb 26, 2013

That's a bit more users then I've got.
Does it give any errors that you can see... or does mIRC just stall / crash ?

Might be able to speed it up... but don't think it will has as many "stats" in it then...
and will take Me some time to re-code it... but will look into coding a version that runs on .hsh instead of ini's.
Hopefully that'll help on mIRC not crashing on you.


I made this for you...
Might help on your problem

ovelayer  -  Feb 26, 2013

it just stalls and crashes no warning..
i think hash tables might be a great idea!
how can i edit the script so i can remove when it notify people with others are away?
i noticed if i remove the entire away part of the script the script in whole doesnt work anymore lol

ovelayer  -  Feb 26, 2013

thank you for the edited script seems to be running great!
cant wait for the hsh version..
hey when you do that version do you think you could add the command !top10 and have it show the users with the most stats? doent have to be chan specific just a general total..
just a
thanks for all your awsome help i really appreciate it!! :)

SRU  -  Feb 27, 2013

Glad that helped... and I've got a top 10 for the version your running now if you interrested.
Still haven't even gotten around to making .hsh version but removing AWAY section should be a easy fix.
You want it removed completely, or just the notice that the highlighted nick is away ?

ovelayer  -  Feb 27, 2013

for the away i just don't want it to notice ppl or chan when the away nick is mentioned
yes i would love the top10 version!!

SRU  -  Feb 27, 2013

Give Me a sec and I'll update this post to include the links


Here the away notice is removed... but away system still there so will msg chan when activated/deactivated
You should use the new version before you add the TOP10 (Should be placed under aliases - ALT+R then Alias TAB (in mIRC))
And I've just remembered that I've forgot the cmd for pulling the iNFO.

Added the CMD for pulling the iNFO... link is the same... let Me know if you find any errors.
Should be working... but not tested... but same as I've got running... I just got a bit more stats that I've removed.

ovelayer  -  Feb 27, 2013

loaded the new scripts ..looked through the alias for the commands but when i type any of the commands all i get is
[ TOP-10 ]-[ ->
other then that everything else is working great

SRU  -  Feb 28, 2013

Sorry about that...
I'll get back to you when I've tested it and made sure everything is working

Found the error... link is the same and should still be placed under aliases (TOP10)

Not working so wait a bit with adding it... re-writing it now.

SRU  -  Feb 28, 2013

Here and here

ovelayer  -  Feb 28, 2013

everything seems to be working now..
only commands i dont see working alone are
if i do !top10 it doesnt report the top10 people
if i do !ttop same thing
but if i do !topunban it displays great..

sorry just thought of this..
is there a way to include nicks you don't want the stats to generate on?
like i don't want it to keep stats on my other channel bots..ect
huge thanks!!

figured out how to edit it to not record the nicks i didnt want it to :)

SRU  -  Feb 28, 2013

I'll post fix for that later... the !TOP10/!TTOP not showing that is.

Here you go... that should do the trick ;)

Sign in to comment

SRU   -  May 20, 2012

Yeah ?

Thanks for the like <3

Yawhatnever   -  May 19, 2012

It comes down to personal preference. If you are the only person who's going to be working on the code, then do whatever makes it easiest for you to read and navigate.

SRU   -  May 17, 2012

Depending on what you mean it's just for separation so I can easily locate and edit and/or add to the script

Yawhatnever   -  May 09, 2012

They're saying the script contains an excessive number of lines that have been commented out. A lot of comments can be a good thing if they're explaining how the script works, but it seems as if the majority here are just asterisks to make the white space pretty.

SRU   -  Apr 28, 2012

@Jordyk19 wuut ?

Once again updated... added !IRCStats + !SEEN
Will update this later on so it works on / tracks pretty much everything instead of just TEXT & ACTiON like it is now

Jordyk19   -  Apr 27, 2012

Comments much...

SRU   -  Apr 27, 2012

Updated... if you find any errors let Me know ;)

Will add the CMDS to pull iNFO out later on... just need to remake the "levelling" system

FordLawnmower  -  Feb 26, 2013

I like your avatar. That chicken looks wasted.

SRU  -  Feb 27, 2013

Haha... thanks :D We are ;)

I like your work

Naughty  -  Sep 10, 2013

How do we make this script to tell stats without colors and it should send the user in notice all the response... please help....!!!!

Sign in to comment

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.