Steam_id ban

By Mr-Juul on Jan 06, 2009

A simple script, where u can add a ban u have done on a cs or cs:s server.

Makes a .txt file called bans.txt where the script is saved.

!addban
!findban <steam_id, nick or anything u want>

My first snippet, so be nice.. :D

on *:TEXT:*:#: {
  if ($1 == !addban ) {
    if ($3 == $null) { msg $chan $nick u need to insert a valid steamID }
    if (steam_* iswm $3) { 
      if ($4 == $null) { msg $chan $nick u need to insert a valid Reason }
      if ($4 != $null) { 
        write $qt($scriptdirbans.txt) 12 $+ $2 14 $+ $3 1 $+ $4- - by $nick
        set %sl.ql $lines($scriptdirbans.txt)
        msg $chan Added ban at $chr(35) $+ %sl.ql
        unset %sl.ql
      }
    }
    else msg $chan $nick u need to insert a valid steamID
  }
  if ($1 == !findban ) {
    set %found $read($scriptdirbans.txt, w,  * $+ $2- $+ *)
    if (%found == $null) {
      /msg $chan Nothing found!
    } 
    else { /msg $chan Found: %found
    }
    set %found
  }
}

Comments

Sign in to comment.
Aucun50   -  Jan 06, 2009

Looks good two things, if (%found == $null) make it if (!%found), if you wont it to work even if they type in color do if (!addban == $strip($1)) { and if (!findban == $strip($1)) {

Also you could add a !findsteam command

 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.