summaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-24 21:21:29 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-24 21:21:29 +0000
commit61e121fb7debd46ea391ab2cfca0df036cef5f07 (patch)
tree5274538e52f6c9c95791b8a0f2b6395a9c3bb811 /src/xline.cpp
parent31b9a9cbb460e8101f603edfaa72e95e85be2e14 (diff)
Added G-line, Z-line and K-line plus SZLINE, SGLINE, etc.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@716 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index 400fac241..1ef612ff1 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -345,6 +345,45 @@ char* matches_gline(const char* host)
return NULL;
}
+void gline_set_creation_time(char* host, time_t create_time)
+{
+ for (std::vector<GLine>::iterator i = glines.begin(); i != glines.end(); i++)
+ {
+ if (!strcasecmp(host,i->hostmask))
+ {
+ i->set_time = create_time;
+ return;
+ }
+ }
+ return ;
+}
+
+void qline_set_creation_time(char* nick, time_t create_time)
+{
+ for (std::vector<QLine>::iterator i = qlines.begin(); i != qlines.end(); i++)
+ {
+ if (!strcasecmp(nick,i->nick))
+ {
+ i->set_time = create_time;
+ return;
+ }
+ }
+ return ;
+}
+
+void zline_set_creation_time(char* ip, time_t create_time)
+{
+ for (std::vector<ZLine>::iterator i = zlines.begin(); i != zlines.end(); i++)
+ {
+ if (!strcasecmp(ip,i->ipaddr))
+ {
+ i->set_time = create_time;
+ return;
+ }
+ }
+ return ;
+}
+
// returns a pointer to the reason if an ip address matches a zline, NULL if it didnt match
char* matches_zline(const char* ipaddr)