Guest User

Untitled

a guest
Jun 16th, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 1.31 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]*[color]\t[color 4]Incomming message[color] at channel: [bold][channel $thatcontext][bold] from user: [bold]$_nick[bold] ($_rest)"
  26.       exec notify-send "XChat" "Incomming message at channel: [channel $thatcontext] from user: $_nick ($_rest)"
  27.       complete EAT_NONE
  28.     }
  29.   }
  30.   complete
  31. }
  32.  
  33. proc splitsrc { } {
  34.   uplevel "scan \$_src \"%\\\[^!\\\]!%\\\[^@\\\]@%s\" _nick _ident _host"
  35. }
  36.  
  37. proc color { {arg {}} } {
  38.   return "\003$arg"
  39. }
  40.  
  41. proc bold { } {
  42.   return "\002"
  43. }
Add Comment
Please, Sign In to add comment