-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathxdccfilter-basic.mrc
More file actions
35 lines (33 loc) · 1.19 KB
/
xdccfilter-basic.mrc
File metadata and controls
35 lines (33 loc) · 1.19 KB
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
;
; Script Name: XDCC-Filter (v1.0) Basic
; Created by: Rand (#NIBL @ Rizon)
;
; Usage: Place into mIRC script folder (Should be C:\Users\username\AppData\Roaming\mIRC\scripts
; /load -rs scripts\xdccfilter.mrc
;
; Displays #NIBL XDCC announcements in a separate query tab.
; Like the advanced version, this also includes a "GETIT" function, which will download the file when you
; double click on the [GETIT] highlighted just after the bots announce message ( /msg Botname XDCC SEND # [GETIT])
on ^*:text:*:#nibl:{
if ($nick ishop $chan) {
haltdef
var %w = @NIBL-XDCC , %text = $1-
if (!$window(@NIBL-XDCC)) { window -e %w }
var %text = $regsubex(xdccanc,%text,/(\/?msg \S+ xdcc send #?\d+)/ig,\t 7[GETIT])
aline %w $timestamp > $chan - $nick : %text
}
}
on ^*:hotlink:*GETIT*:@NIBL-XDCC:{
tokenize 32 $hotlinepos
var %t = $gettok($hotline,$1,32)
if (7[GETIT]* iswm %t) { return }
halt
}
on *:hotlink:*GETIT*:@NIBL-XDCC:{
tokenize 32 $hotlinepos
var %start = $calc($1 - 5) , %finish = $calc(%start + 4)
var %t = $gettok($hotline,%start - %finish,32)
if ($regex(%t,/^\/?msg (\S+) xdcc send (#?\d+)$/iS)) {
msg $regml(1) xdcc send $regml(2)
}
}