Results 1 to 4 of 4

Thread: Your favorite mIRC scripts

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Locotes's Avatar
    Join Date
    Aug 2008
    Location
    Somewhere I belong
    Posts
    69

    Default Your favorite mIRC scripts

    Post your favorite mIRC scripts in here. Here's one of the scripts I use:
    Code:
    on *:input:#:{
      if ($1 == .tb){ /ban -ku $+ $3 $chan $2 $4- | Banned for $3 seconds
    }
    }
    Yup, a simple timeban script, but that's all I need since I use NoNameScript.

    Your turn.

  2. #2
    Rizon Staff
    Join Date
    Apr 2006
    Posts
    1,215

    Default

    1. Tell people how to use it. If they can't script it themselves and want to use it, they won't know how.
    2. Why not use an alias for something like this? To make it look BotServ fantasy command-like, I assume?
    3. Is the | supposed to be appended to the (optional?) kick reason? Like this, | will be interpreted as command seperator and "Banned" is not a command, use $(|).
    4. If the kick reason is meant to be optional, prefix/separate the appended "Banned for $3 seconds" with a | only if a reason is given.
    5. Careful with the brackets. It won't cause any problems in this particular case but it will in others. Put a space between ) and {, scripts break in too many other cases where no spaces are used. Also, if you put the command(s) in the same line you opened the { in and not below, you should also put the closing } in the same line.
    6. The default ban type is nick!*user@host (6) and sucks, (depending on whether it's a default or common ident or username) use ban type 3 (*!*user@*.domain) or 2 (*!*@host)
    7. Considering you posted this here for others to use, maybe check for some more things such as the entered syntax validity and whether you're even able to kick the given nick or not. (Make yourself a handy cankick() function which properly checks for everything including cmode +p.)
    8. "but that's all I need since I use NoNameScript" - This has nothing to do with using or not using NoNameScript, /ban is a mIRC command. IF it had anything to do with NoNameScript, meaning that NoNameScript was somehow required for this, you should've said so anyway.
    9. :)

  3. #3
    Member Locotes's Avatar
    Join Date
    Aug 2008
    Location
    Somewhere I belong
    Posts
    69

    Default

    This is a fix of my first script:
    Code:
    alias tban {
      if (!$3) { echo -a params missing! ex: /tban nick seconds reason | halt }
      if (($2 >= 0) && ($2 < 60)) var %time2 $2 seconds
      if ($2 >= 60) var %time2 $calc( $2 / 60 ) minute(s)
      if ($1 !isop $chan) { ban -ku $+ $2 $chan $1 2 $3- $(|) Banned for %time2 }
    }
    It's an alias now. You'll have to use it this way: /tban nick seconds reason

    This script will ban a user for a certain amount of seconds.

    Thanks to wild and Holz for helping me with this script ><

    ToDo:
    • /tbanlist
    • /tbandel

    Shouldn't be that hard
    Last edited by Locotes; 04-25-2009 at 09:42 AM.

  4. #4
    Rizon Staff
    Join Date
    Apr 2006
    Posts
    1,215

    Default

    Now that looks a lot better already.

    Sure there's more you could do (better syntax checking to make sure that the order and the given parameters are correct (regex), making sure that the given nick is on the channel, making sure that you are able to kick the user (try making a cankick() that can be used anywhere, or ask me for mine), having more specific error messages for all those, and perhaps making the reason optional.

    :b

Similar Threads

  1. Your favorite non-Hollywood movies
    By whatapath in forum TV/Movies
    Replies: 4
    Last Post: 12-02-2012, 10:40 AM
  2. What's your favorite show and movie?
    By Blake in forum TV/Movies
    Replies: 22
    Last Post: 02-24-2011, 07:38 PM
  3. mIRC Colors
    By Zericho in forum IRC client scripts and addons
    Replies: 2
    Last Post: 06-27-2010, 05:15 AM
  4. irssi scripts/triggers
    By The Compiler in forum IRC client scripts and addons
    Replies: 0
    Last Post: 04-25-2009, 08:28 AM
  5. Favorite SuperBowl Commerical
    By escnuk3r in forum Off Topic
    Replies: 2
    Last Post: 02-15-2009, 10:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •