mIRC Home    About    Download    Register    News    Help

Print Thread
#7019 17/01/03 04:19 PM
Joined: Dec 2002
Posts: 28
B
bibadi Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Dec 2002
Posts: 28
I got this commands on
Code:

 on *:INPUT:#:{
  if ( $1 == lol ) {
    say 3Laughing Out Loud $2-
    halt
  }
  if ( $1 == rotf ) {
    say 3Look @ him, He 's Rolling on the floor laughing! $2-
    halt
  }
  if ( $1 == gg ) {
    say 3 Good Game $2-
    halt
  }
  if ( $1 == omg ) {
    say 3O My God $2-
    halt
  }
  if ( $1 == omfg ) {
    say 3O My [censored] God $2-
    halt
  }
  if ( $1 == su ) {
    say 3Shut Up $2-
    halt
  }
  if ( $1 == stfu ) {
    say 3Shut The [censored] Up $2-
    halt
  }
  if ( $1 == MoM ) {
    say 3Masters Of Mayhem $2-
    halt
  }
  if ( $1 == ffs ) {
    say 3For [censored] Sake $2-
    halt
  }
  if ( $1 == wtf ) {
    say 3What The [censored]! $2-
    halt
  }
  if ( $1 == nm ) {
    say 3Never Mind $2-
    halt
  }
  if ( $1 == np ) {
    say 3No Problem $2-
    halt
  }
  if ( $1 == pm ) {
    say 3Private Message $2-
    halt
  }
  if ( $1 == c ) {
    say 3Cee $2-
    halt
  }
  if ( $1 == soz ) {
    say 3Sorry, I really am $2-
    halt
  }
  if ( $1 == rgr ) {
    say 3Roger That $2-
    halt
  }
  if ( $1 == lmao ) {
    say 3Laughing Arse Face Off $2-
    halt
  }
  if ( $1 == bbl ) {
    say 3Be Back Later $2-
    halt
  }
  if ( $1 == bbs ) {
    say 3Be Back Soon $2-
    halt
  }
  if ( $1 == brb ) {
    say 3Be Right Back $2-
    halt
  }
  if ( $1 == gtg ) {
    say 3Got To Go $2-
    halt
  }
  if ( $1 == rofl ) {
    say 3Rolling on the floor laughing $2-
    halt
  }

  if ( $1 == gvd ) {
    say 3GodVerDommelsch $2-
    halt
  }
  if ( $1 == k ) {
    say 3Roger That! $2-
    halt
  }

}

But this will only work when I begin the sentance with such a short cut, can;t it be like...
when i write a sentance, and when there is lol in it like
super lol, that there will be super laughing out loud

I hope you get it :P

[EDIT: added code tags.]

Last edited by Hammer; 17/01/03 06:55 PM.

I'm.... LETHAL
#7020 17/01/03 04:27 PM
Joined: Dec 2002
Posts: 77
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2002
Posts: 77
Sorry i misread what you wanted, yeah that's perfectly possible to do.

Last edited by BlackAle; 17/01/03 04:32 PM.
#7021 17/01/03 04:29 PM
Joined: Dec 2002
Posts: 28
B
bibadi Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Dec 2002
Posts: 28
i don't get it, anyway, can we figure something new, my question is, when i type lol i want there to stand laughing out loud no matter where i type lol, get it?


I'm.... LETHAL
#7022 17/01/03 04:58 PM
Joined: Dec 2002
Posts: 77
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2002
Posts: 77
Just knocked this up quickly, probably not perfect, but this is how i'd do it...

Code:
on *:INPUT:#:{
  if $regex($1, /^//) {
    return  
  }
  hmake shorts 10
  hadd shorts lol laughing out loud
  hadd shorts omg oh my god
  var %text = $1-
  var %count = 1
  while $hget(shorts, %count).item {
    if $regsub(%text, /\b( $+ $ifmatch $+ )\b/ig, $hget(shorts, %count).data, %text) {
      var %replaced = $true  
    }
    inc %count
  }
  hfree shorts
  if %replaced {
    say %text
    halt
  }
}  
 


With that, you could type... lol, omg that is so funny!

and it would become... laughing out loud, oh my god that is so funny!

Last edited by BlackAle; 17/01/03 05:53 PM.
#7023 17/01/03 06:50 PM
Joined: Dec 2002
Posts: 28
B
bibadi Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Dec 2002
Posts: 28
doesn;t work


I'm.... LETHAL
#7024 17/01/03 07:26 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Since you might type "lol" or "omg" in several places on the same line, you must loop through the entire line replacing each instance of the acronym on the line with what you want it to say. However, one caveat (gotcha!) here: if there are any characters touching the lol, such as a comma "lol,", period "lol.", exclamation mark "lol!", question mark "lol?", parentheses "(lol)", quotes "lol", apostrophes 'lol', colors, etc., then they will not be replaced because the "word" (token) contains all the characters between the spaces. So it becomes a matter of remembering to use lol or whatever other acronym you have replaced here with clean spaces on each side.

lol ... rather than lol...
OMG !!! rather than OMG!!!
Code:

on *:INPUT:#:{
  if ((/* iswm $1) || ($ctrlenter)) return
  var %1- = $1-
  while ($istok(%1-,  lol, 32)) %1- = $reptok(%1-,  lol, 3Laughing Out Loud, 1, 32)
  while ($istok(%1-, rotf, 32)) %1- = $reptok(%1-, rotf, 3Look @ him, He's Rolling on the floor laughing!, 1, 32)
  while ($istok(%1-,   gg, 32)) %1- = $reptok(%1-,   gg, 3Good Game, 1, 32)
  while ($istok(%1-,  omg, 32)) %1- = $reptok(%1-,  omg, 3Oh MyGod, 1, 32)
  while ($istok(%1-, omfg, 32)) %1- = $reptok(%1-, omgf, 3Oh My [censored] God, 1, 32)
  while ($istok(%1-,   su, 32)) %1- = $reptok(%1-,   su, 3Shut Up, 1, 32)
  while ($istok(%1-, stfu, 32)) %1- = $reptok(%1-, stfu, 3Shut The [censored] Up, 1, 32)
  while ($istok(%1-,  MoM, 32)) %1- = $reptok(%1-,  MoM, 3Masters Of Mayhem, 1, 32)
  while ($istok(%1-,  ffs, 32)) %1- = $reptok(%1-,  ffs, 3For [censored] Sake, 1, 32)
  while ($istok(%1-,  wtf, 32)) %1- = $reptok(%1-,  wtf, 3What The [censored], 1, 32)
  while ($istok(%1-,   nm, 32)) %1- = $reptok(%1-,   nm, 3Never Mind, 1, 32)
  while ($istok(%1-,   np, 32)) %1- = $reptok(%1-,   np, 3No Problem, 1, 32)
  while ($istok(%1-,   pm, 32)) %1- = $reptok(%1-,   pm, 3Private Message, 1, 32)
  while ($istok(%1-,    c, 32)) %1- = $reptok(%1-,    c, 3Cee, 1, 32)
  while ($istok(%1-,  soz, 32)) %1- = $reptok(%1-,  soz, 3Sorry, I really am, 1, 32)
  while ($istok(%1-,  rgr, 32)) %1- = $reptok(%1-,  rgr, 3Roger That, 1, 32)
  while ($istok(%1-, lmao, 32)) %1- = $reptok(%1-, lmao, 3Laughing Arse Face Off, 1, 32)
  while ($istok(%1-,  bbl, 32)) %1- = $reptok(%1-,  bbl, 3Be Back Later, 1, 32)
  while ($istok(%1-,  bbs, 32)) %1- = $reptok(%1-,  bbs, 3Be Back Soon, 1, 32)
  while ($istok(%1-,  brb, 32)) %1- = $reptok(%1-,  brb, 3Be Right Back, 1, 32)
  while ($istok(%1-,  gtg, 32)) %1- = $reptok(%1-,  gtg, 3Got To Go, 1, 32)
  while ($istok(%1-, rofl, 32)) %1- = $reptok(%1-, rofl, 3Rolling on the floor laughing, 1, 32)
  while ($istok(%1-,  gvd, 32)) %1- = $reptok(%1-,  gvd, 3GodVerDommelsch, 1, 32)
  while ($istok(%1-,    k, 32)) %1- = $reptok(%1-,    k, 3Roger That!, 1, 32)
  say %1-
  halt
}



DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#7025 17/01/03 07:29 PM
Joined: Dec 2002
Posts: 77
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2002
Posts: 77
works fine here, my soluton will also work for the caveat in the above solution.

I'm using mIRC v6.03.

Last edited by BlackAle; 17/01/03 07:35 PM.
#7026 18/01/03 07:56 PM
Joined: Dec 2002
Posts: 28
B
bibadi Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Dec 2002
Posts: 28
ty m8


I'm.... LETHAL
#7027 18/01/03 08:07 PM
Joined: Dec 2002
Posts: 28
B
bibadi Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Dec 2002
Posts: 28
why doesnl;t this works in query's


I'm.... LETHAL
#7028 19/01/03 06:21 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Replace:
on *:INPUT:#:{
with
on *:INPUT:?,#:{

#7029 19/01/03 04:12 PM
Joined: Jan 2003
Posts: 22
M
Ameglian cow
Offline
Ameglian cow
M
Joined: Jan 2003
Posts: 22
hi I m current using this acro but wasn't working on pms so I did what was suggested here :
Code:
 
Replace:
on *:INPUT:#:{ 
with
on *:INPUT:?,#:{ 
 

it works on pms now, but it doesn't work anymore on normal chan ! frown
any ideas of how to make it work on both without problems , please?
thanks

#7030 19/01/03 04:24 PM
Joined: Jan 2003
Posts: 22
M
Ameglian cow
Offline
Ameglian cow
M
Joined: Jan 2003
Posts: 22
never mind I think I got the answer by myself to work on pms and in normal chan just replace
Code:
 on *:INPUT:#:{ 
with
on *:INPUT:*: {
 


Link Copied to Clipboard