Channel Record Script.

By vegeto079 on Feb 24, 2008

This is a Channel Record Script.
It simply will /msg a channel that has a new record of users in the channel.
You can use !record, @record, or /record to see whats in your current channel or $2's channel.
You can use /recordchange,/rdc,/rcc,/rec to change the list of channels that the script uses
Not much else to say.
Echos from script:
"
Record information:
Commands: !Record,@record,/record
To see what the current channel's (active) records are
To see others, type the command with the channel you want to check after
Commands: /recordchange,/rdc,/rcc,/rec
Edit the list of channels that the script uses. Simply type "/command help" to see more info
Script made by Vegeto079/Peachbot/Peach
For more information, or permission to edit, please talk to me on:
Irc.swiftirc.net (#peach), veget00tegev@yahoo.com (E-Mail), or Vegeto079 (Xfire/Steam)
"

..:Updates:..

Tuesday, February 26, 2008.
08:34PM EST
-Script no longer makes records of 1 when netsplits happen, or when you first connect to IRC.
-Script shortened (thanks to Sir_Sonic12)
-Added a "Now:" feature. When you type [!@/]Record it will now show the channel's high, low, and current amount of people.

8:54PM EST
-The record logo has now been changed to %lrecord, to use less space and for easier use in new parts of script.
-The loading part now sets %lrecord to 4[05RECORD04]
-Alias script now shows "Now:" Feature

9:23PM EST
-Now whole new functions: /rec, /rcc, /rdc, /recordchange
-All above mentioned functions bring same options
-They have multiple commands, including Add, Delete, Set(change), check, list, and help.
-Type any of the above mentioned functions to see help menu
-They can delete, add, or change entirely, the whole list, and show you what it is.
-Few bug fixes

Sunday, March 02, 2008.
7:30PM EST
-Script should no longer say (and set) the record is 1 when you are kicked, part a channel, or join the channel right away.
-When kicked, parting a channel, or joining a channel, please wait 3 seconds for the script to take records.
-When connecting or a netsplit happens, please wait 15 seconds for the script to take records.

7:39PM EST
-Above mentioned now should work
-Fixed a few bugs in previous update
-Script should no longer spam a lot of /timer 's if there is a lot of quit/join/part/etc going on

Saturday, March 08, 2008.
4:31AM EST
-Script now waits 120 seconds after a netsplit to start recording again, due to the fact that netsplits can last longer than 10 seconds!
-Script now waits 60 seconds after connecting to start recording again, due to the fact that sometimes you dont join all of your channels in 10 seconds and it records them as 1!
-Fixed netsplit scripts slightly

Saturday, March 15, 2008.
7:51AM EST
-Script will now change the record upon someone typing !record/@record or /record and the high/low is actually less/more than the current amount of people in the channel.

Tuesday, March 18, 2008.
5:47PM EST
-Script will no longer let you /rcc del or /rcc add if the channel is not in the list or already is in the list, respectively.

Friday, April 25, 2008.
3:22PM EST
-Timers are now silenced, and will not spam your Status box.

Tuesday, July 08, 2008.
12:52PM EST
-Netsplit timer set to 600 seconds (10 minutes) instead of 60. After all, netsplits are longer than 1 minute!

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;Script By Vegeto079/Peach/Peachbot;;;;;;;;;;;;;;;;
;;;To Contact me about the script, email veget00tegev@yahoo.com;;;
;;;;;;;;;;;;Or talk to me in #peach on irc.swifitrc.net;;;;;;;;;;;
;;;;;Please do not edit this in any way without my permission;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:load:{
  set %lrecord 4[05RECORD04]
  if (%recordtest == $null) { set %recordtest $?="What channels do you want to have the Record script enabled? $+ $crlf $+ Note: Do not use spaces. Put commas between channels" }
  window @Record
  echo @Record %lrecord Record information:
  echo @Record %lrecord Commands: !Record,@record,/record
  echo @Record %lrecord To see what the current channel's (active) records are
  echo @Record %lrecord To see others, type the command with the channel you want to check after
  echo @Record %lrecord Script made by Vegeto079/Peach/Peachbot
  echo @Record %lrecord For more information, or permission to edit, please talk to me on:
  echo @Record %lrecord Irc.swiftirc.net (#peach), veget00tegev@yahoo.com (E-Mail), or Vegeto079 (Xfire/Steam)
  window @record
  echo @Record %lrecord Current channels set to "04 $+ %recordtest $+ ". To change these, please type /recordchange
}
alias recordchange {
  recordchanges $1-
}
alias rcc {
  recordchanges $1-
}
alias rdc {
  recordchanges $1-
}
alias rec {
  recordchanges $1-
}
alias -l recordchanges {
  if ($1 == $null) || ($1 == help) {
    echo -a %lrecord Record Change Help.
    echo -a %lrecord This script will change the current channels that the Record script is used in.
    echo -a %lrecord You can type /recordchange, /rcc, /rdc, or /rec to use this script
    echo -a %lrecord To use this you can use any of the following syntax:
    echo -a %lrecord /rec add [channelname] --- This will add [channelname] to the list of channels
    echo -a %lrecord /rec del [channelname] --- This will delete [channelname] from the list of channels
    echo -a %lrecord /rec set [channelname] --- This will change the whole list to [channelname]
    echo -a %lrecord /rec help --- Display this
    echo -a %lrecord /rec check/list --- Can use check or list. Displays current list.
    halt
  }
  if ($1 == add) {
    if ($2- isin %recordtest) {
      echo -a %lrecord $2- is already in the list!
      echo -a %lrecord Current list: %recordtest
      halt
    }
    set %recordtest %recordtest $+ , $+ $2-
    echo -a %lrecord $2- added.
    echo -a %lrecord List is now 04 $+ %recordtest
    msg $2- %lrecord Your channel has been added to my !record script list.
    reccheck $2-
    halt
  }
  if ($1 == del) {
    if ($2- !isin %lrecord) {
      echo -a %lrecord $2- is not in the list!
      echo -a %lrecord Current list: %recordtest
      halt
    }
    if ($chr(44) $+ $2- != $null) { set %recordtest $remove(%recordtest,$chr(44) $+ $2-) }
    if ($2- != $null) { set %recordtest $remove(%recordtest,$2-) }
    if ($chr(44) $+ $2- == $null) && ($2- != $null) { echo -a %lrecord $2- not found. | HALT }
    echo -a %lrecord $2- deleted.
    echo -a %lrecord List is now 04 $+ %recordtest
    msg $2- %lrecord Your channel has been deleted from my !record script list.
    halt
  }
  if ($1 == set) {
    set %recordtest $2-
    echo -a %lrecord List set.
    echo -a %lrecord List is now 04 $+ %recordtest
    halt
  }
  if ($1 == check) || ($1 == list) {
    if (%lrecord == $null) {
      echo -a %lrecord There is currently no list! Type /recordchange set [list] to set the list
      halt
    }
    echo -a %lrecord List is currently 04 $+ %recordtest
    halt
  }
}
alias record {
  if ($1 == $null) {
    if ($nick($active,0) > %high [ $+ [ $active ] ]) {
      set %high [ $+ [ $active ] ] $nick($active,0)
      msg $active %lrecord New channel high! 04 $+ $nick($active,0) $+ 
    }
    if ($nick($active,0) < %low [ $+ [ $active ] ]) {
      set %low [ $+ [ $active ] ] $nick($active,0)
      msg $active %lrecord New channel low! 04 $+ $nick($active,0) $+ 
    }
    echo -a 04 $+ $active $+  Records:
    echo -a Most people in channel at once: 04 $+ %high [ $+ [ $active ] ]
    echo -a Least people in channel at once: 04 $+ %low [ $+ [ $active ] ]
    echo -a Current amount of people in channel: 04 $+ $nick($active,0)
    halt
  }
  if ($nick($1,0) > %high [ $+ [ $1 ] ]) {
    set %high [ $+ [ $1 ] ] $nick($1,0)
    msg $1 %lrecord New channel high! 04 $+ $nick($1,0) $+ 
  }
  if ($nick($1,0) < %low [ $+ [ $1 ] ]) {
    set %low [ $+ [ $1 ] ] $nick($1,0)
    msg $1 %lrecord New channel low! 04 $+ $nick($1,0) $+ 
  }
  echo -a 04 $+ $1- $+  Records:
  echo -a Most people in channel at once: 04 $+ %high [ $+ [ $1- ] ]
  echo -a Least people in channel at once: 04 $+ %low [ $+ [ $1- ] ]
  echo -a Current amount of people in channel: 04 $+ $nick($1-,0)
  halt
}
on *:join:%recordtest:{
  if ($nick == $me) {
    set %dontchannel yes
    .timer 01 03 unset %dontchannel
  }
  if (%dontchannel != $null) { goto end }
  inc %recordtimer [ $+ [ $chan ] ]
  if (%recordtimer [ $+ [ $chan ] ] > 2) {
    .timerrecord $+ $chan 0 30 reccheck $chan
    .timer 01 03 unset %recordtimer [ $+ [ $chan ] ]
  }
  if (%high [ $+ [ $chan ] ] == $null) { set %high [ $+ [ $chan ] ] $calc($nick($chan,0) -1) }
  if (%low [ $+ [ $chan ] ] == $null) { set %low [ $+ [ $chan ] ] $calc($nick($chan,0) +1) }
  if ($nick($chan,0) > %high [ $+ [ $chan ] ]) {
    set %high [ $+ [ $chan ] ] $nick($chan,0)
    msg $chan %lrecord New channel high! 04 $+ $nick($chan,0) $+ 
  }
  if ($nick($chan,0) < %low [ $+ [ $chan ] ]) {
    set %low [ $+ [ $chan ] ] $nick($chan,0)
    msg $chan %lrecord New channel low! 04 $+ $nick($chan,0) $+ 
  }
  :end
}
on *:part:%recordtest:{
  if ($nick == $me) {
    set %dontchannel yes
    .timer 01 03 unset %dontchannel
  }
  if (%dontchannel != $null) { goto end }
  inc %recordtimer [ $+ [ $chan ] ]
  if (%recordtimer [ $+ [ $chan ] ] > 2) {
    .timerrecord $+ $chan 0 30 reccheck $chan
    .timer 01 03 unset %recordtimer [ $+ [ $chan ] ]
  }
  if (%high [ $+ [ $chan ] ] == $null) { set %high [ $+ [ $chan ] ] $calc($nick($chan,0) -1) }
  if (%low [ $+ [ $chan ] ] == $null) { set %low [ $+ [ $chan ] ] $calc($nick($chan,0) +1) }
  if ($nick($chan,0) > %high [ $+ [ $chan ] ]) {
    set %high [ $+ [ $chan ] ] $nick($chan,0)
    msg $chan %lrecord New channel high! 04 $+ $nick($chan,0) $+ 
  }
  if ($nick($chan,0) < %low [ $+ [ $chan ] ]) {
    set %low [ $+ [ $chan ] ] $nick($chan,0)
    msg $chan %lrecord New channel low! 04 $+ $nick($chan,0) $+ 
  }
  :end
}
on *:kick:%recordtest:{
  if ($knick == $me) {
    set %dontchannel yes
    .timer 01 03 unset %dontchannel
  }
  if (%dontchannel != $null) { goto end }
  if (%high [ $+ [ $chan ] ] == $null) { set %high [ $+ [ $chan ] ] $calc($nick($chan,0) -1) }
  if (%low [ $+ [ $chan ] ] == $null) { set %low [ $+ [ $chan ] ] $calc($nick($chan,0) +1) }
  if ($nick($chan,0) > %high [ $+ [ $chan ] ]) {
    set %high [ $+ [ $chan ] ] $nick($chan,0)
    msg $chan %lrecord New channel high! 04 $+ $nick($chan,0) $+ 
  }
  if ($nick($chan,0) < %low [ $+ [ $chan ] ]) {
    set %low [ $+ [ $chan ] ] $nick($chan,0)
    msg $chan %lrecord New channel low! 04 $+ $nick($chan,0) $+ 
  }
  :end
}
on $*:TEXT:/^[`.!@]record/Si:#:{
  if ($left($1,1) == .) || ($left($1,1) == !) || |($left($1,1) == `) { set %recordstuff .notice $nick }
  if ($left($1,1) == @) { set %recordstuff msg $chan }
  if (%dontchannel != $null) { .notice $nick %lrecord Records currently disabled. Please try again in 60 seconds. | HALT }
  if ($2 == $null) {
    if (%high [ $+ [ $chan ] ] == $null) {
      %recordstuff %lrecord There are no records for this channel!
      halt
    }
    if ($nick($chan,0) > %high [ $+ [ $chan ] ]) {
      set %high [ $+ [ $chan ] ] $nick($chan,0)
      msg $chan %lrecord New channel high! 04 $+ $nick($chan,0) $+ 
    }
    if ($nick($chan,0) < %low [ $+ [ $chan ] ]) {
      set %low [ $+ [ $chan ] ] $nick($chan,0)
      msg $chan %lrecord New channel low! 04 $+ $nick($chan,0) $+ 
    }
    %recordstuff %lrecord $chan Records: High: 04 $+ %high [ $+ [ $chan ] ] $+  Low: 04 $+ %low [ $+ [ $chan ] ] $+  Now: 04 $+ $nick($chan,0) $+ 
  }
  if ($2 != $null) {
    if (%high [ $+ [ $2 ] ] == $null) {
      %recordstuff %lrecord There are no records for $2 $+ !
      halt
    }
    if ($nick($2,0) > %high [ $+ [ $2 ] ]) {
      set %high [ $+ [ $2 ] ] $nick($2,0)
      msg $2 %lrecord New channel high! 04 $+ $nick($2,0) $+ 
    }
    if ($nick($2,0) < %low [ $+ [ $2 ] ]) {
      set %low [ $+ [ $2 ] ] $nick($2,0)
      msg $2 %lrecord New channel low! 04 $+ $nick($2,0) $+ 
    }
    %recordstuff %lrecord $2 Records: High: 04 $+ %high [ $+ [ $2 ] ] $+  Low: 04 $+ %low [ $+ [ $2 ] ] $+  Now: 04 $+ $nick($2,0) $+ 
  }
}
alias reccheck {
  if (%high [ $+ [ $1 ] ] == $null) { set %high [ $+ [ $1 ] ] $calc($nick($1,0) -1) }
  if (%low [ $+ [ $1 ] ] == $null) { set %low [ $+ [ $1 ] ] $calc($nick($1,0) +1) }
  if ($nick($1,0) > %high [ $+ [ $1 ] ]) {
    set %high [ $+ [ $1 ] ] $nick($1,0)
    msg $1 %lrecord New channel high! 04 $+ $nick($1,0) $+ 
  }
  if ($nick($1,0) < %low [ $+ [ $1 ] ]) {
    set %low [ $+ [ $1 ] ] $nick($1,0)
    msg $1 %lrecord New channel low! 04 $+ $nick($1,0) $+ 
  }
}
on *:quit:{ if (*.*.*.* iswm $1) && (*.*.*.* iswm $2) && (%netsplit == $null) { recordblah | inc -u10 %netsplit } }
on *:quit:{ if (((.net isin $1) || (.com isin $1) || (.org isin $1) || (.irc isin $1)) && ((.net isin $2) || (.com isin $2) || (.org isin $2) || (.irc isin $2)) && (!$3-)) { recordblah } }
;Thanks to "Ghost" and "Advanced" for netsplit scripts.
on *:connect:{
  set %dontchannel yes
  .timer 01 60 unset %dontchannel
  echo -s %lrecord Records disabled for 60 seconds -- Connecting.
  .timer 01 60 echo -s %lrecord Records now enabled.
}
alias recordblah {
  if (%recordblah == $null) {
    echo -s %lrecord Records disabled for 600 seconds -- Netsplit detected.
    .timer 01 600 echo -s %lrecord Records now enabled
    set %dontchannel yes
    .timer 01 600 unset %dontchannel
    set %recordblah yes
    .timer 01 02 unset %recordblah
  }
}

Comments

Sign in to comment.
vegeto079   -  Mar 23, 2008

O.o

 Respond  
Jonesy44   -  Mar 19, 2008

o.O

 Respond  
DarkDaemon   -  Mar 19, 2008

w0000000000000000oooooooooooooooo0000000000000!

 Respond  
DarkDaemon   -  Mar 19, 2008

w0000000000000000oooooooooooooooo0000000000000!

 Respond  
vegeto079   -  Feb 28, 2008

Thanks, fixed.

 Respond  
Sir_Sonic12   -  Feb 24, 2008

instead of having two on text events for ! and @record, you could do:

on $*:TEXT:/^[!@]record/Si:#:{

then just set a var like:

var %msgway = $iif($left($1,1) == @,msg $chan,notice $nick)

and then put %msgway record stuff here

 Respond  
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.