Jump to content

Cleric xtx

Members
  • Posts

    285
  • Joined

  • Last visited

Posts posted by Cleric xtx

  1. A wildcard question mark, as Ozzy used, can also represent a space.

     

    I tried using a regular expression for 15 or more characters but it didn't accept the expressions for "at least ... occurances" and "between ... and ... occurances".

    ;at least 15 - didn't work
    /^\w{15,}$/
    
    ;between 15 and 100 - didn't work
    /^\w{15,100)$/
    
    ;15 exactly - did work
    /^\w{15}$/

  2. When the file doesn't exist in the destination directory, the code I posted works. When the file does exist in the destination directory, however, then you need to use -o after the alias (ie: copy -o source destination)

  3. /copy c:/path/to/image.ext d:/newpath/image.ext

    Alternatively, for the lazy person tongue.gif

    alias cimg {
     var %a = $sfile(c:,Choose the Image,Copy)
     copy %a $sdir(d:,Destination) $+ $nopath(%a)
    }

    Just type /cimg

  4. *!* $+ $left($gettok($address(nick,1),1,N),9) $+ @*.*..*$*

     

    Nick is whatever you're using to identify the nickname (eg: $nick) and N is the $chr value for @ - I can't access mIRC atm to check the value as it's being a P.I.T.A. until I restart AGAIN dry.gif

  5. Notice doesn't always work on MSN for some weird reason. Before I switched to local (ctcp) time greetings I used to keep switching between privmsg, query and notice. I never could figure out why...

    I don't have any problem any more as I gave up using MSN when it changed to paid and I no longer use a form of private message laugh.gif

  6. It's good to experiment to see what different ways there are to do the same thing so you can learn what can be more efficient (or simpler more to your liking).

    Personally, in this case, I don't think there's much point in removing half of a word then adding a wildcard instead as there aren't any alternatives. Whatever floats your boat I guess...

     

    * $+ $replace($right($remove($ial($me).addr,-1),passport,*)

    The above will work just the same as * $+ $ial($me).addr but which one is more efficient? wink.gif

  7. You could have it like this:

    on admin:text:!snk*:#:{
    var %a = 1
    while (%a <= $numtok($2-,32)) {
      kick $chan $ial(* $+ $gettok($2-,%a,32) $+ *).nick Kicked because $nick said so.
      inc %a
    }
    msg $chan %a nick(s) kicked successfully.
    }

    but that would be the same as *nick* each time. There's more chance of kicking a wrong nickname by accident this way.

  8. I think this is what you're after...

    on admin:text:!snk*:#:{
     var %a = 1
     while (%a <= $numtok($2-,32)) {
       kick $chan $ial($gettok($2-,%a,32)).nick Kicked because $nick said so.
       inc %a
     }
     msg $chan %a nick(s) kicked successfully.
    }

    It will kick a list of wildcard nicknames. Eg:

    Sam: !snk *zzy* err* *eam

    The above text will kick the first nicknames matching those wildcards.

  9. This should create a list of all owners then msg the list to the channel.

    on me:*:join:#:{
     var %a = 0
     while (%a <= $nick($chan,0,a,ovhr)) {
       var %b = %b $+ , $nick($chan,%a,a,ovhr)
       inc %a
     }
     if (%b) { msg $chan Hello to owners $right(%b,-1) }
    }

  10. on admin:text:@dehost*:{ mode $chan -o $ial($2).nick }
    menu nicklist {
    Admin level
    . $iif($level($ial($$1).addr) != admin,$style(2))Add user:/auser admin $ial($$1).addr
    . $iif($level($ial($$1).addr) == admin,$style(2))Remove user:/ruser admin $ial($$1).addr
    }

    Only people with an admin user level can use the above command. You can add users to the admin user level with the above code by right-clicking the nicklist and selecting the "admin level" popup. You can (optionally) also a wildcard in the remote like so:

    @dehost err0*

    The above will dehost the first nickname matching the wildcard (eg: on this forum that would logically be err0r). You can use several wildcards and also begin with a wildcard like so:

    @dehost *r0*

    However, be careful when using wildcards as it will match the first matching nickname (eg: with the above, ar0n would be dehosted before err0r).

     

    PS: MucH's code is what you asked for but it's an evil snippet imo; dehosting someone just because they say "dehost" tongue.gif

  11. it's telling me i am banned lol

     

    and it's not just one group, it's all of them

    Maybe people just don't like you any more, ozzy tongue.gif

     

    Nobody else seems to have that problem lol_sign.gif

  12. try this:

    on *:text:*:{
     if ($regex($1, /^+(0|8|9|11|15)+.+$/gi) >= 1) {
       inc -u20 %bcolor. [ $+ [ $nick ] ] 
       if (%bcolor. [ $+ [ $nick ] ] > 1) { kick # $nick I warned you,now please change your colour }
       else { msg # $nick $+ , change to a normal colour please not yellow,light green or light blue }
     }
    }

    Unfortunately, it doesn't work when a space is placed between the colour and the text.

  13. on *:join:#:{ scankicks }
    alias scankicks {
     var %a = 1
     while (%a <= $nick($chan,0)) {
       if ($level(!* $+ $ial($nick($chan,%a))) == kicklist) || ($level($nick($chan,%a)) == kicklist) {
         msg $chan $nick($chan,%a) is on my kicklist and will be kicked.
         sockwrite -n msn.server. $+ $cid kick $chan $nick($chan,%a)
       }
     inc %a
    }

    To prevent flooding, try using a timer like DreaM said.

×
×
  • Create New...