mIRC Home    About    Download    Register    News    Help

Print Thread
#149598 21/05/06 04:45 AM
Joined: Jan 2005
Posts: 16
D
Deviant Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jan 2005
Posts: 16
So I have this seen snippet but only works when you use
black text. How do I change it so it recognizes coloured text?

*Would be very much thankful*

Code:
ON *:START: {
  hmake seen 100
  if ($isfile(seen.dat)) { hload seen seen.dat }
}
ON *:EXIT: {
  if ($hget(seen)) { hsave -o seen seen.dat }
}
ON *:TEXT:*:#: {
  hadd seen $nick text $chan $ctime $1-
  if ($1 = !seen) {
    if ($2 ison $chan) { msg $chan 13·14!13¦14[13·14 $2 is right here. 13·14]13¦14!13· }
    else { msg $chan 13·14!13¦14[13·14 $nick $+ : $seenparse($2) 13·14]13¦14!13· }
  }
}
alias seen {
  echo $colour(info) -a *** $seenparse($1)
}
ON *:ACTION:*:#: {
  hadd seen $nick act $chan $ctime $1-
}
ON *:QUIT: {
  hadd seen $nick quit $ctime $1-
}
on *:PART:#: {
  hadd seen $nick part $chan $ctime $1-
}
on *:JOIN:#: {
  hadd seen $nick join $chan $ctime $1-
}
ON *:NICK: {
  hadd seen $nick nick $newnick $ctime
}
ON *:KICK:#: {
  hadd seen $nick kicking $chan $ctime $knick $1-
  hadd seen $knick kick $chan $ctime $nick $1-
}
alias -l seenparse {
  var %x = $hget(seen,$1)
  if (!%x) { return I have not seen $1 }
  var %n = $1
  tokenize 32 %x
  if ($1 = text) { return I last saw %n in $2 $duration($calc($ctime - $3)) ago saying $4- }
  if ($1 = act) { return I last saw %n in $2 $duration($calc($ctime - $3)) ago acting $4- }
  if ($1 = quit) { return I last saw %n quiting $duration($calc($ctime - $2)) ago $iif($3,with the message: $3-) }
  if ($1 = part) { return I last saw %n leaving $2 $duration($calc($ctime - $3)) ago with the message: $4- }
  if ($1 = join) { return I last saw %n joining $2 $duration($calc($ctime - $3)) ago. }
  if ($1 = nick) { return I last saw %n changing their nickname to $2 $duration($calc($ctime - $3)) ago. }
  if ($1 = kicking) { return I last saw %n kicking $4 from $2 $duration($calc($ctime - $3)) ago with the reason: $5- }
  if ($1 = kick) { return I last saw %n being kicked from $2 by $4 $duration($calc($ctime - $3)) with the reason: $5- }
} 

Last edited by Deviant; 21/05/06 05:04 AM.
#149599 21/05/06 05:58 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
This belongs in the Scripts & Popups section.

#149600 21/05/06 10:43 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
locate this line
ON *:TEXT:*:#: {

change to
ON *:TEXT:*:#: { tokenize 32 $strip($1-)

#149601 21/05/06 12:56 PM
Joined: Jan 2005
Posts: 16
D
Deviant Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jan 2005
Posts: 16
Sorry :|

#149602 21/05/06 12:59 PM
Joined: Jan 2005
Posts: 16
D
Deviant Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jan 2005
Posts: 16
Thanks man.


Link Copied to Clipboard