-
Notifications
You must be signed in to change notification settings - Fork 3
/
documentation.txt
executable file
·145 lines (91 loc) · 3.62 KB
/
documentation.txt
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
I NEED TO BE CLEANED UP AND SPLIT INTO SEPERATE FILES!!!
FIXME: (OMG a FIXME in documentation!) Someone remove the above line after the
cleanup.
***** DEFENDER DOCUMENTATION PROJECT *****
*** Scanning Module (defender/Modules/Scan) interface documentation ***
This should provide everything needed to write new modules for defender. If
something is missing please let Thunderhacker know.
NOTICE: Not all of these are supported in all link modules. Because the lead
developer uses inspircd on his network the inspircd11 link module will be the
first module to support new interface subroutines.
Please see the existing modules for help on formatting. If you need
additional assistance please stop by #defender on irc.chatspike.net or leave a
message on the forums at http://ircdefender.org/qsf/
Subroutines listed in alphabetical order for no other reason than the person
writing this documentation feels a bit OCD right now :) Actual order in the
module doesn't matter, but take a look at the existing modules to try to
keep things somewhat standardized.
Remember: "And LARRY said, all thy modules shalt end with 1, and it was so."
sub handle_join
my ($nick,$chan) = @_;
Triggers when someone joins a channel
$nick is the client that joined
$chan is the channel joined
sub handle_kick
my ($nick,$chan,$kicked,$reason) = @_;
Triggers when someone is kicked from a channel
$nick is the client that did the kicking
$chan is the channel the client was kicked from
$kicked is the client that was kicked from the channel
$reason is the reason given in the kick
sub handle_mode
my ($nick,$target,$params) = @_;
Triggers when a mode is set
$nick is the nick that sets the mode
$target is who/what the mode is set on
$params is the mode(s) set
sub handle_nick
my ($oldnick,$newnick) =@_;
Triggers when a client changes its nickname
$oldnick is the nickname is had
$newnick is the nickname it is now
sub handle_notice
my ($nick,$ident,$host,$chan,$notice) = @_;
Triggers when defender receives a NOTICE or CTCP reply
$nick is who sent the NOTICE
$ident is ident of $nick
$host is host of $nick
$chan is channel the NOTICE is directed at
$notice is the text of the NOTICE
sub handle_part
my ($nick,$chan) = @_;
Triggers when someone parts a channel normally (not kicked)
$nick is who parted
$chan is the channle parted
sub handle_privmsg
my ($nick,$ident,$host,$chan,$msg) = @_;
Triggers when someone says something in a channel defender is in
$nick is who said something
$ident is the ident of $nick
$host is the host of $nick
$chan is the channel something was said in
$msg is what was said
sub handle_quit
my ($nick,$reason) = @_;
Triggers when someone exits the server (including bans/kills)
$nick is the client exiting
$reason is the quit message
sub handle_topic
my ($nick,$chan,$topic) = @_;
Triggers when someone changes the topic of a channel
$nick is the topic changer
$chan is the channel the topic was changed on
$topic is the new topic
sub init
no parameters passed
Triggers when a module is initialized
Should check dependencies and include a provides line. This is where
you should load settings from a config file if needed.
sub scan_user
my ($ident,$host,$serv,$nick,$fullname,$print_always) =@_
Triggers when someone connects to a server
$ident is the ident of the client
$host is the host of the client
$serv is the server connected to
$nick is the nickname
$fullname is the realname (GECOS)
$print_always is for future use and should be ignored.
sub stats
No parameter passed
Triggers when someone does a status request. Should print status
messages to the control channel.