Top

Comments

  (35)  RSS
Pass's
Scakk
Comments: 241
 
mIRC Snippet:  $haddtok/$hremtok
Posted on Sep 13, 2008 4:36 pm
Never mind. Brain lapse.
Pass
Comments: 46
 
mIRC Snippet:  $haddtok/$hremtok
Posted on Sep 13, 2008 3:40 pm
Actually Scakk, the current order for $haddtok supports multiple words. The words are separated by commas, not spaces, so there's no need to change the order (it's as close as i could get to $addtok's syntax).
Scakk
Comments: 241
 
mIRC Snippet:  $haddtok/$hremtok
Posted on Sep 13, 2008 1:25 pm
I would redo the $haddtok as below.

Code:
alias haddtok {
  if ($isid) {
    hadd $iif(!$hget($1),-m) $1-2 $addtok($hget($1,$2),$4-,$3)
  }
}


New order would be --> $haddtok(Table,Item,C,Text)


1) Creates table if not created.
2) Allows entry of more than item into item.



------------------


Can shorten $hremtok to the below

Code:

alias hremtok {
  if ($isid) {
    if ( (!$hget($1)) || (!$hget($1,$2)) ) { echo -ag Error. No such $iif(!$hget($1), Table., Item.) }
    else { hadd $1-2 $remtok($hget($1,$2),$3,$4,$5) }
  }
}

Pass
Comments: 46
 
mIRC Snippet:  $haddtok/$hremtok
Posted on Sep 13, 2008 10:23 am
It's been updated to incorporate the table creation. how's that, fellas?
^Neptune
Comments: 440
 
mIRC Snippet:  $haddtok/$hremtok
Posted on Sep 13, 2008 8:45 am
Why not do a .make property so you can give more customization over it?
Pass
Comments: 46
 
mIRC Snippet:  $haddtok/$hremtok
Posted on Sep 13, 2008 8:34 am
Yes, i left it out because i did not see the need for creating a table when the user would be trying to ADD data to a pre-existing table item (although, it would work). I feel as if it is personal preference, really.
Lindrian
Comments: 763
 
mIRC Snippet:  $haddtok/$hremtok
Posted on Sep 13, 2008 7:06 am
Code:
    if ($hget($1)) hadd $1-2 $addtok($hget($1,$2),$3,$4)
    else echo $color(info) * /haddtok: Error, no such table $iif($1,( $+ $1 $+ ))


You can use the -m switch here, incase the table does not exist, it creates it.
Pass
Comments: 46
 
mIRC Snippet:  $haddtok/$hremtok
Posted on Sep 12, 2008 11:46 pm
Indeed, it is a time-saver if you use hashtables as much as myself
EL
Comments: 1,186
 
mIRC Snippet:  $haddtok/$hremtok
Posted on Sep 12, 2008 9:42 pm
Ima have to test it but it looks like it will come in handy.`-.-´
EL
Comments: 1,186
 
mIRC Snippet:  Embed Pic & Zip
Posted on Aug 28, 2008 9:04 pm
Nice.`-.-´
^Neptune
Comments: 440
 
mIRC Snippet:  Text censoring
Posted on Aug 25, 2008 3:43 pm
So.. if you added like the word "pie" to the list, everytime someone said pie in the chat it would be filtered?

Coolio
Pass
Comments: 46
 
mIRC Snippet:  Embed Pic & Zip
Posted on Aug 24, 2008 9:03 pm
Updated, and works well
Zmodem
Comments: 270
 
mIRC Snippet:  Embed Pic & Zip
Posted on Aug 24, 2008 8:55 pm
:-)
Pass
Comments: 46
 
mIRC Snippet:  Embed Pic & Zip
Posted on Aug 24, 2008 8:45 pm
Good call, Zmodem. I never gave that a thought, I'll update in a few.
Zmodem
Comments: 270
 
mIRC Snippet:  Embed Pic & Zip
Posted on Aug 24, 2008 8:44 pm
Hey, I just wanted to fix this for you, cause you don't have to write a batch file ;) mIRC can communicate with the CMD all on it's own:

Code:

run cmd /K copy /b %p + %r %o



Enjoy!
Pass
Comments: 46
 
mIRC Snippet:  Embed Pic & Zip
Posted on Aug 24, 2008 8:20 pm
EL
Comments: 1,186
 
mIRC Snippet:  Embed Pic & Zip
Posted on Aug 24, 2008 8:06 pm
Quote:

Description
This code is used for embedding a compressed file into a picture file. A single-line *.bat file is created to preform the embedding process. The output file is located in the $mircdir and is named "output.EXT" (.EXT represents the respective picture extension).

O_O you may have to be a tad bit more clear.`-.-´
Pass
Comments: 46
 
mIRC Snippet:  /amsg & /ame
Posted on Jan 16, 2006 6:07 pm
Thanks for the info, FiberOPtics. That will come in handy for future references.
QuickStep
Comments: 123
 
mIRC Snippet:  /amsg & /ame
Posted on Jan 13, 2006 11:41 am
ah right my bad didnt actually realised it was called from the scon alias. I know about the recursion problem in mirc since I tried writing some basic functions with this idea (fibonacci most easiest example) but indeed I noticed it closes down my mirc. Anyway thanks for the comments
FiberOPtics
Comments: 28
 
mIRC Snippet:  /amsg & /ame
Posted on Jan 13, 2006 9:48 am
Btw the same recursion happens for example with filter and the -k flag.

Try:

alias test filter -fk $mircini test

Basically, the same case where the alias is called but not directly from the alias, rather it's filter that calls test here, which in term calls the filter again, which in term calls test again, etc, infinite recursion, making your mIRC crash.

Same example as the /scon or /scid case.

Here's another fun one:

alias test1 test2
alias test2 test1

(the above example used to work fine in older versions for 500 calls or something then it stopped, but in the current version it just crashes instantly)
1 2 Next
Bottom