-
Notifications
You must be signed in to change notification settings - Fork 2
/
quotes_clips.ini
40 lines (40 loc) · 2.61 KB
/
quotes_clips.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[script]
n0=on *:TEXT:!quote*:#: {
n1= if (($msgtags(mod).key != 1 && $right(#,-1) != $nick) && (%floodquote. $+ #) || ($($+(%,floodquote.,$2),2))) { return }
n2= set -u15 %floodquote. $+ # On
n3= if (!$2) {
n4= msg # $read(# $+ quotes.txt,n)
n5= }
n6= elseif ($2 == add) && ($3) && ($msgtags(mod).key == 1 || $right(#,-1) == $nick) { .write # $+ quotes.txt $replace($3-,|,$chr(124)) | msg # [Quote Added] $+($lines(# $+ quotes.txt),:) $3- }
n7= elseif ($2 == del) && ($3 isnum) && ($lines(# $+ quotes.txt) >= $3) && ($msgtags(mod).key == 1 || $right(#,-1) == $nick) { msg # [Quote Deleted] $3 $+ : $read(# $+ quotes.txt, $+ $3) | .write -dl $+ $3 # $+ quotes.txt }
n8= elseif ($2 isnum) && ($lines(# $+ quotes.txt) >= $2) { msg # [Quote $+($2,/,$lines(# $+ quotes.txt),]) $read(# $+ quotes.txt,n,$2) }
n9= elseif ($2 == find) && ($len($3) > 2) {
n10= var %x $lines(# $+ quotes.txt)
n11= while (%x) {
n12= if ($3- isin $read(# $+ quotes.txt,%x)) {
n13= inc %quotes.search
n14= set %quotes.return $addtok(%quotes.return,%x,32)
n15= }
n16= dec %x
n17= }
n18= if (!%quotes.search) { msg # [Quote Search] No quotes found with the phrase " $+ $3- $+ " | unset %quotes.* | halt }
n19= if (%quotes.search = 1) { msg # [Quote Search] One quote found: $+([,%quotes.return,]) $read(quotes.txt,n,%quotes.return) | unset %quotes.* }
n20= else {
n21= msg # [Quote Search] Found %quotes.search quotes that have the phrase $+(",$3-,") in them.
n22= .timer 1 2 msg # [Quote $+($gettok(%quotes.return,1,32),/,$lines(quotes.txt),]) $replace($read(quotes.txt, n, $gettok(%quotes.return,1,32)),|,$!chr(124))
n23= .timer 1 4 msg # [Quote Search] Other quote numbers: $right(%quotes.return,-2)
n24= unset %quotes.*
n25= }
n26= }
n27=}
n28=
n29=on *:TEXT:!clip*:#: {
n30= if (($msgtags(mod).key != 1 && $right(#,-1) != $nick) && (%floodclip. $+ #) || ($($+(%,floodclip.,$2),2))) { return }
n31= set -u15 %floodclip. $+ # On
n32= if (!$2) {
n33= msg # $read(# $+ clip.txt,n)
n34= }
n35= elseif ($2 == add) && ($3) && ($msgtags(mod).key == 1 || $right(#,-1) == $nick) { .write # $+ clip.txt $replace($3-,|,$chr(124)) | msg # [Clip Added] $+($lines(# $+ clip.txt),:) $3- }
n36= elseif ($2 == del) && ($3 isnum) && ($lines(# $+ clip.txt) >= $3) && ($msgtags(mod).key == 1 || $right(#,-1) == $nick) { msg # [Clip Deleted] $3 $+ : $read(# $+ clip.txt, $+ $3) | .write -dl $+ $3 # $+ clip.txt }
n37= elseif ($2 isnum) && ($lines(# $+ clip.txt) >= $2) { msg # [Clip $+($2,/,$lines(# $+ clip.txt),]) $read(# $+ clip.txt,n,$2) }
n38=}