Protect User+Self System

By ProIcons on Feb 05, 2009

///Commands /protect_user [-d,-e,-version,-alias,-help,-report,-list] <+bkd>

To Add a User in your Protect List /protect_user <+bkd>
To Del a User From Your Protect list /protect_user -d
To See all users in protect list /protect_user -list

///Flags

b = Ban
k = Kick
d = Deop
///Options

-list = List all Users
-d = Del a User
-e = Edit a User
-version = Shows The Version
-self = Add,Edit,Del Personal Protection
-help = Shows the help
-alias = add an alias
-report = All activities of your protect
///Logs

//Add A User
/protect_user +bkd Bot

  • Bot Added in my Protect list with Options: Ban Kick Deop
    /protect_user +bkd Bot
  • Bot is allready in your Protect List

//Kick Time

  • Bot was kicked by ProIcons2 (ProIcons2)
  • ProIcons2 was kicked by ProIcons (Do Not Kick My Protected User (Bot))
    Join:O Bot - (!Dj@79.107.226.213) Μολις ηρθε στο #smile
  • ProIcons sets mode: +o Bot

//Ban Time

  • ProIcons2 sets mode: +b Bot!@ Do Not Ban My Protected User (Bot)
  • ProIcons sets mode: -bo+b Bot!@ ProIcons2 ProIcons2!@

//Deop Time

  • ProIcons2 sets mode: -o Bot Do Not Deop My Protected User (Bot)
  • ProIcons sets mode: +o-o Bot ProIcons2

//List Users
/protect_user -list

  • Users In My Protect List:
  • 1 * Bot «» Options: deop kick ban
  • End of /Protect_User command

//Del a user
/protect_user -d Bot

  • Bot Deleted from my Protect list
    /protect_user -d Bot
  • Bot is not on my Protect List

//help
/protect_user -help

  • /protect_user [-d,-list,-help,-version] <b,d,k> /\ -d Del User /\ -list list userv /\ -Help Commands /\ -version verion /\ +bdk Flags -> +b Ban Protection /\ +k Kick Protection /\ +d Deop Protecton /\

//version
/protect_user -version

  • Protect System By 4ProIcons2 Version (2)

//Self
/protect_user -self +bdk

  • ProIcons Your Protect Options are: deop kick ban
    /protect_user -self -d
  • Your Personal Protection Has been disabled

//report

/protect_user -report on

  • Protected Nicks Report on
    /protect_user -report on
  • Report is allready enabled
    /protect_user -report
  • Protected Nicks Report is on
    /protect_user -report off
  • Protected Nicks Report off
    /protect_user -report off
  • Report is allready disabled

//edit
//protect_user -e <+bdk>
/protect_user -e +bdk Bot

  • Bot Edited from my Protect list with New Options: ban deop kick
    /protect_user -e +bdk Bot1
  • Bot1 is not on Your Proetect List
    /protect_user -e +chs Bot
  • You Must add Flags <+b,d,k>

///Install
Open Your Remotes with "alt + r"
and paste the folowing code

on *:start:{ if (%report == on) { window @report } }
on *:kick:#:{ 
  if ($knick == $me) && ($nick != $me) {
    if (kick isin %self) {
      if (%report == on) { write Protected_User.txt [« $time $date »] $nick kicks me | echo @report 4[« $time $date »] $nick kicks me (Server: $server $+ ) }
      join #
      if ($nick == chanserv) || ($nick == operserv) { 
        if (%report == on) { write Protected_User.txt [« $time $date »] Kick -> A Service Kick me , I Can't Do Anything | echo @report 4[« $time $date »] Kick -> A Service Kicks me , I Can't Do Anything (Server: $server $+ ) } | halt 
      }
      else {
        .timer -m 1 00989 ocheck $chan
        .timer -m 1 00989 kick # $nick 1Do not Kick me
        if (%report == on) { write Protected_User.txt [« $time $date »] Kick -> I successfuly kick the enemy $nick | echo @report 4[« $time $date »] I successfuly kick the enemy $nic (Server: $server $+ ) }
      }
    }
  }

  if ($nick != $me) && ($opnick != $nick) {
    if ($knick isin %protected_u) { 
      if (Kick isin %Nick_ [ $+ [ $knick ] ]) {

        if (%report == on) { write Protected_User.txt [« $time $date »] $nick kicks Protect User $knick (Server: $server $+ ) | echo @report 4[« $time $date »] $nick kicks Protect User $knick (Server: $server $+ ) }
        if ($nick == chanserv) || ($nick == operserv) { 
          if (%report == on) { write Protected_User.txt [« $time $date »] Kick -> A Service Kicks $knick , I Can't Do Anything (Server: $server $+ ) | echo @report 4[« $time $date »] Kick -> A Service Kicks $knick , I Can't Do Anything (Server: $server $+ ) } | halt 
        }
        if ($me !isop $chan) { if (%report == on) { write Protected_User.txt [« $time $date »] Kick -> I Can't Kick the enemy $nick Because I am Not Op Of this chan (Server: $server $+ ) | echo @report 4[« $time $date »] Kick -> I Can't Kick the enemy $nick Because I am Not Op Of this chan (Server: $server $+ ) } | halt }
        else {
          if (%report == on) { write Protected_User.txt [« $time $date »] Kick -> I successfuly kick the enemy $nick (Server: $server $+ ) | echo @report 4[« $time $date »] Kick -> I successfuly kick the enemy $nick (Server: $server $+ ) }
          kick # $nick 1Do Not Kick My Protected User (4 $+ $knick $+ )1
          set %invitor $knick
          invite $knick $chan
        }
      }
    }
  }
}
alias ocheck { if ($me !isop $1) { halt } }
on *:deop:#:{
  if ($opnick == $me) && (deop isin %self) && ($nick != $me) { 
    if (%report == on) {
      write Protected_User.txt [« $time $date »] $nick deops me (Server: $server $+ ) 
      echo @report 4[« $time $date »] $nick deops me (Server: $server $+ ) 
    }

    if ($nick != chanserv) || ($nick == operserv) {   
      cs op # $me
      msg $chan Do Not Deop me 
      .timer -m 1 00989  mode # -o $nick 
      if (%report == on) {
        write Protected_User.txt [« $time $date »] Deop -> I successfuly op my self (Server: $server $+ ) 
        echo @report 4[« $time $date »] Deop -> I successfuly op my self (Server: $server $+ ) 
      }
    } 
    else { 
      cs op # $me
      if (%report == on) {
        write Protected_User.txt [« $time $date »] Deop -> I can't deop a Service (Server: $server $+ ) 
        echo @report 4[« $time $date »] Deop -> I can't deop a Service (Server: $server $+ ) 
      }

    }
  }
  if ($nick != $me) && ($opnick != $nick) {
    if ($opnick isin %protected_u) { 
      if (Deop isin %Nick_ [ $+ [ $opnick ] ]) {

        if (%report == on) { write Protected_User.txt [« $time $date »] $nick deops Protect User $opnick (Server: $server $+ ) | echo @report 4[« $time $date »] $nick deops Protect User $opnick (Server: $server $+ ) }
        if ($nick == chanserv) || ($nick == operserv) { 
          if (%report == on) { write Protected_User.txt [« $time $date »] Deop -> A Service Deops $opnick , I Can't Do Anything (Server: $server $+ ) | echo @report 4[« $time $date »] Deop -> A Service Deops $opnick , I Can't Do Anything (Server: $server $+ ) } | halt 
        }
        if ($me !isop $chan) { if (%report == on) { write protected_user.txt 4[« $time $date »] Deop -> I Can't Op my Protected Nick Because I am Not Op Of this chan (Server: $server $+ ) | echo @report 4[« $time $date »] Deop -> I Can't Op my Protected Nick Because I am Not Op Of this chan (Server: $server $+ ) } | halt }
        else {
          if (%report == on) { write Protected_User.txt [« $time $date »] Deop -> I successfuly op my Protected User $opnick (Server: $server $+ ) | echo @report 4[« $time $date »] Deop -> I successfuly op my Protected User $opnick (Server: $server $+ ) }
          mode # +o-o $opnick $nick
          msg $chan Do Not Deop My Protected User (4 $+ $opnick $+ )
        }
      }
    }
  }
}

on *:ban:#:{ 
  if ($bnick == $me) && ($nick != $me) {
    if (ban isin %self) {
      if (%report == on) { write Protected_User.txt [« $time $date »] $nick Bans me | echo @report 4[« $time $date »] $nick Bans me (Server: $server $+ ) }
      if ($nick == chanserv) || ($nick == operserv) { 
        if (%report == on) { write Protected_User.txt [« $time $date »] Ban -> A Service Bans me , I Can't Do Anything | echo @report 4[« $time $date »] Ban -> A Service Bans me , I Can't Do Anything (Server: $server $+ ) } | halt 
      }
      if ($me !isop $chan) { 
      if (%report == on) { write Protected_User.txt [« $time $date »] Ban -> I Can't unban my self Because I am Not Op Of this chan | echo @report 4[« $time $date »] Ban -> I Can't unban my self Because I am Not Op Of this chan (Server: $server $+ ) } | halt }
      else {
        mode $chan -bo+b $banmask $nick $nick
        msg # Do Not Ban Me
        if (%report == on) { write Protected_User.txt [« $time $date »] Ban -> I successfuly unban my self | echo @report 4[« $time $date »] I successfuly unban my self (Server: $server $+ ) }
      }
    }
  }
  if ($nick != $me) && ($opnick != $nick) {
    if ($bnick isin %protected_u) || ($remove($gettok($banmask,1,33),:) isin %protected_u) { 
      if (Ban isin %Nick_ [ $+ [ $bnick ] ]) || (Ban isin %Nick_ [ $+ [ $remove($gettok($banmask,1,33),:) ] ]) {
        if (%report == on) { write Protected_User.txt [« $time $date »] $nick Bans Protect User $bnick | echo @report 4[« $time $date »] $nick Bans Protect User $bnick (Server: $server $+ ) }
        if ($nick == chanserv) || ($nick == operserv) { 
          if (%report == on) { write Protected_User.txt [« $time $date »] Ban -> A Service Bans $bnick , I Can't Do Anything | echo @report 4[« $time $date »] Ban -> A Service Bans $bnick , I Can't Do Anything (Server: $server $+ ) } | halt 
        }
        if ($me !isop $chan) { if (%report == on) { write Protected_User.txt [« $time $date »] Ban -> I Can't unban my Protected Nick Because I am Not Op Of this chan | echo @report 4[« $time $date »] Ban -> I Can't unban my Protected Nick Because I am Not Op Of this chan (Server: $server $+ ) } | halt }
        else {
          mode $chan -bo+b $banmask $nick $nick
          msg # Do Not Ban My Protected User (4 $+ $bnick $+ )
          if (%report == on) { write Protected_User.txt [« $time $date »] Ban -> I successfuly unban my Protected User $bnick | echo @report 4[« $time $date »] I successfuly unban my Protected User $bnick (Server: $server $+ ) }
          set %invitor $bnick
          if ($bnick !ison $chan) {
            invite $bnick $chan
          }
        }
      }
    }
  }
}

on *:join:#:{
  if ($nick == %invitor) {
    op # $nick
    unset %invitor
  }
}
on ^*:NOTIFY:{ if (%report == on) && ($istok(%protected_u,$nick,32)) { write Protected_User.txt [« $time $date »] Protected Nick : $nick is on Irc (Server: $server $+ ) | echo @Report 4[« $time $date »] Protected Nick : $nick is on Irc (Server: $server $+ ) | halt } }
on ^*:UNOTIFY:{ if (%report == on) && ($istok(%protected_u,$nick,32)) { write Protected_User.txt [« $time $date »] Protected Nick : $nick Has Quit irc or his Is Changed His Name (Server: $server $+ ) | echo @Report 4[« $time $date »] Protected Nick : $nick Has Quit irc or his Is Changed His Name (Server: $server $+ ) | halt } }
on *:nick:{ if (%report == on) {
    if ($istok(%protected_u,$nick,32)) { write Protected_User.txt [« $time $date »] Protected Nick : $nick Has changed his/her nick to : $newnick (Server: $server $+ ) | echo @Report 4[« $time $date »] Protected Nick : $nick Has changed his/her nick to : $newnick (Server: $server $+ ) }
    if ($istok(%protected_u,$newnick,32)) { write Protected_User.txt [« $time $date »] Nick : $nick has Changed his/her nick to : Protected User: $+ $newnick (Server: $server $+ ) | echo @Report 4[« $time $date »] Nick : $nick has Changed his/her nick to : Protected User: $+ $newnick (Server: $server $+ )
    } 
  }
}
alias Protect_User {
  set %flags +k +b +d +bdk +kdb +bkd +kbd +dkb +dbk +dk +bd +kd +bk +kb +db
  if ($1 == -self) {
    if ($2 != $null) {
      if ($2 == -d) { unset %self | echo $color(info) -a * Your Personal Protection Has been disabled | halt }
      if (+ isin $2) {
        if ($istok(%flags,$2,32)) {
          unset %self
          if (D isin $2) { set %Self deop }
          if (K isin $2) { set %self %self kick }
          if (B isin $2) { set %self %self ban }
          echo -a -
          echo $color(info) -a * $me Your Protect Options are: %self
          echo -a -
        }
        else { echo $color(info) -a * You Must add Flags <+b,d,k> }  
      }
      else { echo $color(info) -a * You Must add Flags <+b,d,k> }   

    }
    else { echo $color(info) -a * /Protect_User: insufficient parameters }
    halt 
  }

  if ($1 == -alias) {
    if ($2 != $null) { 

      if ($2 == +d) { 
        if ($istok(%pualias,$3,32)) { .alias $3 | echo $color(info) -a * Alias 4 $+ $3 $+  removed | set %pualias $deltok(%pualias,$findtok(%pualias,$3,32),32) }
        else { echo $color(info) -a * Alias 4 $+ $3 $+  does not exists }
        halt
      }
      if ($2 == +list) { print_aliases | halt }
      if ($istok(%pualias,$2,32)) { echo $color(info) -a * Alias 4 $+ $2 $+  is allready on your Alias List | halt }
      .alias $2 protect_user $chr(36) $+ $chr(49) $+ $chr(45) 
      set %pualias %pualias $2
      echo $color(info) -a * Alias 4 $+ $2 $+  added You Can Type Now  4/ $+ $2 $+ 
      halt

    }
    else { halt }
  }
  if ($1 == -report) {
    if ($2 == +logs) { if ($exists(Protected_User.txt)) { run protected_user.txt } | else { echo $color(info) -a * You Have No Logs } | halt }
    if ($2 == on) && (%report != on) { echo $color(info) -a * Protected Nicks Report On | set %report on | window @Report }
    else { if (%report == on) { echo $color(info) -a * Protected Nicks Report is %report } }
    if ($2 == off) && (%report != off) { echo $color(info) -a * Protected Nicks Report Off | set %report off | window -c @Report }
    else { if (%report == off) { echo $color(info) -a * Protected Nicks Report is %report } }

    halt
  }
  if ($1 == -version) { echo $color(info) -a * Protect System By 4ProIcons $+ $color(info) Version (6) | halt }
  if ($1 == -help) { 
    echo $color(info) -a * Protect User Script Version 6 by 4ProIcons
    echo $color(info) -a * Help Commands
    echo $color(info) -a * /protect_user [-d,-e,-report,-self,-alias,-list,-help,-version] <+ b,d,k> <nick> 
    echo $color(info) -a * 4-d 7Del User (@all for delete all)
    echo $color(info) -a * 4-e7 edit users options +<b,d,k>
    echo $color(info) -a * 4-self7 edit,add,del Your Self protection -self +<b,d,k> /\ -self -d
    echo $color(info) -a * 4-report7 Stats of Protected Users
    echo $color(info) -a * 4-alias7 create a shortcut of this word 
    echo $color(info) -a * 4-list7 list users 
    echo $color(info) -a * 4-Help7 Commands
    echo $color(info) -a * 4-version7 version
    echo $color(info) -a * 4+bdk7 Flags -> 
    echo $color(info) -a * +b Ban Protection 
    echo $color(info) -a * +k Kick Protection 
    echo $color(info) -a * +d Deop Protecton  
    halt
  }
  if ($1 == -list) { print_Pusers | halt }
  if ($1 == -e) { 
    if ($3 != $null) {
      if ($istok(%protected_u,$3,32)) {
        if (+ isin $2) {
          if ($istok(%flags,$2,32)) {
            unset %nick_ $+ $3 
            if (D isin $2) { set %Nick_ $+ $3 deop }
            if (K isin $2) { set %Nick_ $+ $3 %nick_ [ $+ [ $3 ] ] kick }
            if (B isin $2) { set %nick_ $+ $3 %nick_ [ $+ [ $3 ] ] ban }
            echo -a -
            echo $color(info) -a * $3 Edited from my Protect list with New Options: %nick_ [ $+ [ $3 ] ]
            echo -a -

          }
          else { echo $color(info) -a * You Must add Flags <+b,d,k> <nick> } 
        }
        else { echo $color(info) -a * You Must add Flags <+b,d,k> <nick> } 
      }
      else { echo $color(info) -a * $3 is not on Your Proetect List }
    }
    else { echo $color(info) -a * /Protect_User: insufficient parameters }
    halt
  }
  if ($1 != -d) {

    if ($2 != $null) {
      if (!$istok(%protected_u,$2,32)) {
        if (+ isin $1) {
          if ($istok(%flags,$1,32)) {
            if (D isin $1) { set %Nick_ $+ $2 deop }
            if (K isin $1) { set %Nick_ $+ $2 %nick_ [ $+ [ $2 ] ] kick }
            if (B isin $1) { set %nick_ $+ $2 %nick_ [ $+ [ $2 ] ] ban }
            set %Protected_u %Protected_u $2
            .notify $2
            echo -a -
            echo $color(info) -a * $2 Added in my Protect list with Options: %nick_ [ $+ [ $2 ] ]
            echo -a -
          }
          else { echo $color(info) -a * You Must add Flags <+b,d,k> <nick> }  
        }
        else { echo $color(info) -a * You Must add Flags <+b,d,k> <nick> }   
      }
      else { echo $color(info) -a * $2 is allready in your Protect List }
    }
    else { echo $color(info) -a * /Protect_User: insufficient parameters }
  }
  else { 
    if ($2 == @all) { unset %nick_* | unset %protected_u | Print_pusers | halt }
    if ($2 != $null) {
      if ($2 isin %protected_u) {
        set %protected_u $deltok(%protected_u,$findtok(%protected_u,$2,32),32)
        unset %nick_ $+ $2
        .notify -r $2
        echo -a -
        echo $color(info) -a * $2 Deleted from my Protect list
        echo -a -
      }
      else { echo $color(info) -a * $2 is not on my Protect List }
    }
    else { echo $color(info) -a * /Protect_User: insufficient parameters }
  }
}
alias -l print_pusers {
  echo $color(info) -a * Users In My Protect List:
  if ($numtok(%Protected_U,32) == 0) { echo $color(info) -a * You Have No Users In Your Protect List }
  echo -a -
  var %i = 1
  while ( %i <= $numtok(%Protected_U,32) ) {
    echo $color(info) -a * %i * 4 $+ $gettok(%protected_u,%i,32) 7«» 2Options: 4 $+ %nick_ [ $+ [ $gettok(%protected_u,%i,32) ] ]
    echo -a -
    inc %i
  }
  echo $color(info) -a * End of /Protect_User command
}
alias -l print_aliases {
  echo $color(info) -a * Aliases In My Protect List:
  if ($numtok(%pualias,32) == 0) { echo $color(info) -a * You Have No aliases In Your Protect List }
  echo -a -
  var %i = 1
  while ( %i <= $numtok(%pualias,32) ) {
    echo $color(info) -a * %i * 4 $+ $gettok(%pualias,%i,32) 
    echo -a -
    inc %i
  }
  echo $color(info) -a * End of /Protect_User command
}

Comments

Sign in to comment.
ProIcons   -  Sep 12, 2010

Updated Version 2.0

Fixed Bugs

New Dialog System
http://www.hawkee.com/snippet/7930/

 Respond  
Tannn3r   -  Aug 10, 2010

I like it! Very nice job. I wish all of the codes on here were like this!

 Respond  
xplo   -  May 17, 2010

but overall code is neat and clean i like it

 Respond  
xplo   -  May 17, 2010

codes should not contain chanserv operserv, nickserv.. since not ALL networks uses them.

 Respond  
ProIcons   -  Feb 28, 2009

Add

Added Self Protection Feature

add

 Respond  
ProIcons   -  Feb 18, 2009

Bug Fixed

On Report

Bug Fixed

 Respond  
ProIcons   -  Feb 14, 2009

Updated Version 6

Fixed Bug

Aliases Protection
New Report System

fixed bugs end

 Respond  
ProIcons   -  Feb 14, 2009

Updated Version 5 .

Fixed Bug

On Ban
On Kick
On Deop
On Start
New Report System

Fixed Bugs End

 Respond  
ProIcons   -  Feb 13, 2009

All Bugs Fixed New Version 4 Updated Introduction

 Respond  
ProIcons   -  Feb 07, 2009

Updated Version 4

Added Options
-e (edit)
/protect_user -e

/protect_user -e

  • bot Edited from my Protect list with New Options: Ban Deop

/protect_user -e

  • bots is not on Your Proetect List

Fixed Bugs On Protect list

 Respond  
ProIcons   -  Feb 07, 2009

Updated

Fixed Bug On Notify

 Respond  
Aucun50   -  Feb 05, 2009

Looks neat

 Respond  
slacker   -  Feb 05, 2009

could be coded abit better but nice work 4/10

 Respond  
ProIcons   -  Feb 05, 2009

Updated Version 3

Added Features:

-report <on,off>
/protect_user -report <on,off>

In the next Will be added sockets for auto Updates and Version

 Respond  
ProIcons   -  Feb 05, 2009

Updated Version 2.
Fixes#start

1 Bug On Ban

2 Bug On Deop Event

3 Bug On Alias Options

4 Bug On join

Fixes#end

Added Options
-help
/protect_user -help

  • /protect_user [-d,-list,-help,-version] <b,d,k> /\ -d Del User /\ -list list userv /\ -Help Commands /\ -version verion /\ +bdk Flags -> +b Ban Protection /\ +k Kick Protection /\ +d Deop Protecton /\

-version
/protect_user -version

  • Protect System By 4ProIcons2 Version (2)

In the next Will be added sockets for auto Updates and Version

 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.