Relek-IRC User System

By Aurora801 on Jul 23, 2009

Simple User Protection and Record system. I call it the Relek System. I made a IRC called Relek-IRC and this is the basic User Protection system for it. :] Enjoy.
P.S. On a Side note: I was wondering if anyone could maybe help me make the relek ban part simpler, it's the part of

on *:BAN:#: { if ($level($banmask) = 10)

Thanks! :]

ScreenShot:
Image

on *:CTCPREPLY:*: {

  haltdef

  echo -a $timestamp 4,1(7,1-4,1(14,1CTCP Reply from0,1 $nick $+ 4,1)7,1-4,1) $1-

}

ctcp ^*:VERSION: {

  haltdef

  if ($level($nick) == 10) { echo -a 4,1(7,1-4,1(9,1CTCP from a 14,1Relek4,1)7,1-4,1) }

  echo -a 4,1(7,1-4,1(9,1CTCP: 0,1VERSION4,1)7,1-4,1)14,1 $nick

  ctcpreply $nick VERSION 4,1(7,1-4,1(3,1R14,1elek¯0,1I9,1R8,1C14,1 %Relek_Theme Edition4,1)7,1-4,1)

  ctcpreply $nick VERSION 4,1(7,1-4,1(14,1Scripted by Aurora4,1)7,1-4,1)

  halt

}

ctcp +10:*: { echo -a 4,1(7,1-4,1(9,1CTCP from a 14,1Relek4,1)7,1-4,1) }

ctcp ^*:PING: {

  haltdef

  echo -a 4,1(7,1-4,1(9,1CTCP: 0,1PING4,1)7,1-4,1)14,1 $nick

  ctcpreply $nick PING 4,1(7,1-4,1(14,1PONG!!4,1)7,1-4,1)

  halt

}

ctcp ^*:TIME: {

  haltdef

  echo -a 4,1(7,1-4,1(9,1CTCP: 0,1TIME4,1)7,1-4,1)14,1 $nick

  ctcpreply $nick TIME 4,1(7,1-4,1(0,1Time: $time(hh:nn:ss tt) $+ 4,1)7,1-4,1)

  ctcpreply $nick TIME 4,1(7,1-4,1(0,1Date&Time: $fulldate $+ 4,1)7,1-4,1)

  halt

}

;###########

;##Aliases##

;###########

alias Relek {

  if ($1 = Add) {

    auser 10 $2

    if (xxx.xxx.xxx !isin $address($2,4)) { auser 10 $address($2,4) }

    RelekNotice $2

  }

  if ($1 = Remove) { 

    ruser $2

    auser NonRelek $2

    RelekNotice $2

  }

}

alias RelekNotice {

  if ($level($1) = 10) {

    notice $1 4,1(7,1-4,1(14,1You are now a 4,1Relek14,1 And Will Be Respected and Protected on this System, and All Servers it is Attatched To.4,1)7,1-4,1)

    halt

  }

  if ($level($1) = NonRelek) { 

    notice $1 4,1(7,1-4,1(14,1You Have Broken The 4,1Relek 14,1Laws and Are No Longer a Relek. Your Protection Is Now Halted.4,1)7,1-4,1)

    ruser $1

    halt

  }

  else { notice $1 4,1(7,1-4,1(14,01 $+ $2- $+ 4,1)7,1-4,1) }

}

alias RelekStats {

  if ($1 = Public) {

    msg $chan 4,1(7,1-4,1(14,1Relek Stats for4,1 $2 14,1Are As Follows.4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Baned:0,1 %RelekBaned. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Kicks:0,1 %RelekKicks. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Kicked:0,1 %RelekKicked. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Ops:0,1 %RelekOps. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Deops:0,1 %RelekDeops. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Voices:0,1 %RelekVoices. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Devoices:0,1 %RelekDEvoices. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Bans:0,1 %RelekBans. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Joins:0,1 %RelekJoins. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Parts:0,1 %RelekParts. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    msg $chan 4,1(7,1-4,1(14,1Quits:0,1 %RelekQuits. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

  }

  if ($1 = Private) {

    echo -a $timestamp 4,1(7,1-4,1(14,1Relek Stats for4,1 $2 14,1Are As Follows.4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Baned:0,1 %RelekBaned. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Kicks:0,1 %RelekKicks. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Kicked:0,1 %RelekKicked. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Ops:0,1 %RelekOps. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Deops:0,1 %RelekDeops. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Voices:0,1 %RelekVoices. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Devoices:0,1 %RelekDEvoices. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Bans:0,1 %RelekBans. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Joins:0,1 %RelekJoins. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Parts:0,1 %RelekParts. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

    echo -a $timestamp 4,1(7,1-4,1(14,1Quits:0,1 %RelekQuits. [ $+ [ $2 ] ] $+ 4,1)7,1-4,1)

  }

}

;#########

;##Menus##

;#########

menu channel,nicklist {

  Relek-IRC

  .Releks

  ..Relek Stats(Private):/RelekStats Private $1

  ..Relek Stats(Public):/RelekStats Public $1

  ..Relek Control ( $+ $1 $+ )

  ...Add Relek:/Relek Add $1

  ...Remove Relek:/Relek Remove $1

  ..Advertise:/tsay 4,1(7,1-4,1(14,1This is the 4,1Relek 14,1Protection System.4,1)7,1-4,1)

}

;######################

;##Relek Stats Events##

;######################

on *:BAN:*: {

  if ($level($banmask) = 10) {

    var %BanMask = 1

    var %BanEnd = $nick(#,0)

    mode $chan -b $banmask

    msg $chan 4,1(7,1-4,1(14,1That Person under the 4,1Relek 14,1Protection System.4,1)7,1-4,1)

    while (%BanMask <= %BanEnd) {

      if ($nick(#,%BanMask) = $banmask || $address($nick(#,%BanMask),*)) = $banmask) { inc %RelekBaned. [ $+ [ $nick(#,%BanMask) ] ] | halt }

      else { inc %BanMask }

    }

    halt

  }

  else { halt }

}

on *:KICK:*: {

  if ($level($knick) = 10) {

    invite $knick $chan

    inc %RelekKicked. [ $+ [ $knick ] ]

    inc %Kicks. [ $+ [ $nick ] ]

    if ($kicks. [ $+ [ $nick ] ] = 10) { kick $chan $nick 4,1(7,1-4,1(14,1That Person Is Under The 4,1Relek 14,1Protection System.4,1)7,1-4,1) }

  }

  else { halt }

}

on +10:KICK:*: {

  msg $chan 4,1(7,1-4,1(14,1A 4,1Relek 14,1Has Kicked A $knick From $chan $+ .4,1)7,1-4,1)

  inc %RelekKicks. [ $+ [ $nick ] ]

  halt

}

on +10:BAN:*: { inc %RelekBans. [ $+ [ $nick ] ] | halt }

on +10:DEBAN:*: { inc %RelekDeBans. [ $+ [ $nick ] ] | halt }

on +10:OP:*: { inc %RelekOps. [ $+ [ $nick ] ] | halt }

on +10:DEOP:*: { inc %RelekDeops. [ $+ [ $nick ] ] | halt }

on +10:VOICE:*: { inc %RelekVoices. [ $+ [ $nick ] ] | halt }

on +10:DEVOICE:*: { inc %RelekDevoices. [ $+ [ $nick ] ] | halt }

on +10:QUIT: { inc %RelekQuits. [ $+ [ $nick ] ] | halt }

on +10:PART:*: {

  msg $chan 4,1(7,1-4,1(14,1A Fellow 4,1Relek 14,1Has Left The Room.4,1)7,1-4,1)

  inc %RelekParts. [ $+ [ $nick ] ]

  halt

}

Comments

Sign in to comment.
Aurora801   -  Jul 27, 2009

That part of the script will track how many times a user has kicked a Relek, and if that number reches 10, it will kick them back.

 Respond  
Spanky   -  Jul 27, 2009

i just noticed i didnt read it wrong >_>

 Respond  
Spanky   -  Jul 26, 2009

oh so whats this

 on *:KICK:*: {

  if ($level($knick) = 10) {

    invite $knick $chan

    inc %RelekKicked. [ $+ [ $knick ] ]

    inc %Kicks. [ $+ [ $nick ] ]

    if ($kicks. [ $+ [ $nick ] ] = 10) { kick $chan $nick 4,1(7,1-4,1(14,1That Person Is Under The 4,1Relek 14,1Protection System.4,1)7,1-4,1) }
 Respond  
Aurora801   -  Jul 26, 2009

Oh, and btw. If a added user has kicked someone, it's supposed to announce it. :P

 Respond  
Aurora801   -  Jul 26, 2009

It doesn't kick back. Lol. I haven't added that to it. It's mainly a record and ban protection script. :]

 Respond  
Spanky   -  Jul 25, 2009

i take its meant to protect certain people right >.> well it dont kick the people who kick them And it went off on every kick not just the protected people.

 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.