Guest User

Untitled

a guest
Jun 10th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 1.14 KB | None | 0 0
  1. on XC_CHANACTION myaction {
  2.   if { [string equal -nocase "[me]" [lindex $_raw 1]] } {
  3.     print "[color 5]*\t[lindex $_raw 1] [lindex $_raw 2]"
  4.     complete EAT_XCHAT
  5.   } else {
  6.     if { [string match -nocase "*[me]*" [lindex $_raw 2]] } {
  7.       set thatcontext [getcontext]
  8.       set thiscontext [findcontext]
  9.       if { ![string equal $thiscontext $thatcontext] } {
  10.         print $thiscontext "[color 4]*\t[lindex $_raw 1]/[channel $thatcontext] [lindex $_raw 2]"
  11.         print "[color 4]*\t[lindex $_raw 1] [lindex $_raw 2]"
  12.         complete EAT_XCHAT
  13.       }
  14.     }
  15.   }
  16.   complete
  17. }
  18.  
  19. on PRIVMSG mynick02 {
  20.   if { [string match -nocase "*[me]*" $_rest] } {
  21.     set thatcontext [getcontext]
  22.     set thiscontext [findcontext]
  23.     if { ![string equal $thiscontext $thatcontext] } {
  24.       splitsrc
  25.       print $thiscontext "[color 4]*\t[bold]$_nick/[channel $thatcontext] said:[bold][color] $_rest"
  26.       complete EAT_NONE
  27.     }
  28.   }
  29.   complete
  30. }
  31.  
  32. proc splitsrc { } {
  33.   uplevel "scan \$_src \"%\\\[^!\\\]!%\\\[^@\\\]@%s\" _nick _ident _host"
  34. }
  35.  
  36. proc color { {arg {}} } {
  37.   return "\003$arg"
  38. }
  39.  
  40. proc bold { } {
  41.   return "\002"
  42. }
Add Comment
Please, Sign In to add comment