chat.tin 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #var lib_ui_chat[META] {
  2. {NAME} {聊天日志}
  3. {DESC} {抓取聊天信息,分置到不同的日志文件里去}
  4. {AUTHOR} {担子炮}
  5. };
  6. #list chat-channel create {
  7. {{pattern}{求助} {action}{helpmeLog} {gag}{true}}
  8. {{pattern}{北侠QQ群} {action}{qqLog} {gag}{true}}
  9. {{pattern}{%!{闲聊|副本|谣言}} {action}{chatLog} {gag}{true}}
  10. {{pattern}{%!{江湖|任务|交易}} {action}{jhLog} {gag}{true}}
  11. {{pattern}{%!{队伍|门派|本地|区域}} {action}{bdLog} {gag}{true}}
  12. {{pattern}{私聊} {action}{tellLog} {gag}{false}}
  13. {{pattern}{%*} {action}{groupLog} {gag}{true}}
  14. };
  15. #function {lib_ui_chat.Init} {
  16. load-file {etc/ui-chat.tin};
  17. #return true;
  18. };
  19. #nop 普通聊天信息;
  20. #action {~^%c【%+2..5u】%c%+1..10u%c({[a-z A-Z]+})%c: %*$E} {
  21. chat.log {%2} {%0};
  22. } {4.994};
  23. #nop 单行的 emote 表情;
  24. #action {~^%c【%+2..5u】%*(%+1..S{| \S+} ||{| \S+} %+1..S)%c$E} {
  25. chat.log {%2} {%0};
  26. } {4.994};
  27. #nop 多行的 emote 表情;
  28. #action {~^%c【%+2..5u】%*$E} {
  29. chat.log-multi-line {%2} {%0};
  30. } {4.995};
  31. #alias {chat.log} {
  32. #local type {%1};
  33. #local text {%2};
  34. #local id {};
  35. #loop {1} {&chat-channel[]} {id} {
  36. #local pattern {$chat-channel[$id][pattern]};
  37. #local action {$chat-channel[$id][action]};
  38. #local gag {$chat-channel[$id][gag]};
  39. #if { "$type" == "$pattern" } {
  40. $action $text;
  41. #if { "$gag" == "true" } {
  42. #line gag;
  43. };
  44. #return;
  45. };
  46. };
  47. };
  48. #alias {chat.log-multi-line} {
  49. #local type {%1};
  50. #local text {%2};
  51. chat.log {$type} {$text};
  52. #if { "$type" != "{闲聊|求助|谣言}" } {
  53. #return;
  54. };
  55. #if { "$type" == "{闲聊|谣言}" && {$text} == {%* {\e\[0m}} } {
  56. #return;
  57. };
  58. #class chat.log open;
  59. #action {~^%*{|ID=chat.log}$} {
  60. chat.log {%1} {%%0};
  61. } {4.993};
  62. #action {~^%*(%w ||{| \S+} %+1..S)%c{|ID=chat.log}$} {
  63. chat.log {%1} {%%0};
  64. #class chat.log kill;
  65. } {4.992};
  66. #if { "$type" == "{闲聊|谣言}" } {
  67. #action {~^%* {\e\[0m}{|ID=chat.log}$} {
  68. chat.log {%1} {%%0};
  69. #class chat.log kill;
  70. } {4.992};
  71. };
  72. #delay chat.log {#class chat.log kill} 0;
  73. #class chat.log close;
  74. };
  75. #action {~^%c%u%c(%w)告诉你:%*$} {
  76. chat.log 私聊 {%0};
  77. } {9.999};
  78. #action {~^%c你告诉%c%u%c:%*$} {
  79. chat.log 私聊 {%0};
  80. } {9.999};
  81. set learn_emote 1;
  82. #action {^关闭所有频道。$} {
  83. #class chat-turn-on open;
  84. #gag {^你现在并没有打开任何频道。$};
  85. #gag {^打开 %*频道。$};
  86. #gag {^你现在打开的频道:%*。$};
  87. #action {^目前你的频道使用情况如下:$} {
  88. #class chat-turn-on kill;
  89. };
  90. #class chat-turn-on close;
  91. #line gag;
  92. };
  93. tune all;
  94. tune bd;
  95. tune chat;
  96. tune fb;
  97. tune group;
  98. tune helpme;
  99. tune jh;
  100. tune jy;
  101. tune mp;
  102. tune nation;
  103. tune qq;
  104. tune qy;
  105. tune rumor;
  106. tune rw;
  107. tune tt;
  108. tune;