summaryrefslogtreecommitdiff
path: root/src/sessions.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-10 22:46:49 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-10 22:46:49 +0000
commite1bdc807a8593538cbf4f9901d7664ebe6c1b26f (patch)
tree7532b85cf1c748b4a2b26bf2cabadd4892026cef /src/sessions.c
parent88186bfd2c1f7b0d5fea151485c91703735ef048 (diff)
Fixed compile errors in os_session.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1992 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/sessions.c')
-rw-r--r--src/sessions.c98
1 files changed, 0 insertions, 98 deletions
diff --git a/src/sessions.c b/src/sessions.c
index 94137b073..ea225d888 100644
--- a/src/sessions.c
+++ b/src/sessions.c
@@ -441,101 +441,3 @@ int exception_add(User * u, const char *mask, const int limit,
return 1;
}
-
-/*************************************************************************/
-
-static int exception_del(const int index)
-{
- if (index < 0 || index >= nexceptions)
- return 0;
-
- delete [] exceptions[index].mask;
- delete [] exceptions[index].reason;
- nexceptions--;
- memmove(exceptions + index, exceptions + index + 1,
- sizeof(Exception) * (nexceptions - index));
- exceptions = static_cast<Exception *>(srealloc(exceptions, sizeof(Exception) * nexceptions));
-
- return 1;
-}
-
-/* We use the "num" property to keep track of the position of each exception
- * when deleting using ranges. This is because an exception's position changes
- * as others are deleted. The positions will be recalculated once the process
- * is complete. -TheShadow
- */
-
-static int exception_del_callback(User * u, int num, va_list args)
-{
- int i;
- int *last = va_arg(args, int *);
-
- *last = num;
- for (i = 0; i < nexceptions; i++) {
- if (num - 1 == exceptions[i].num)
- break;
- }
- if (i < nexceptions)
- return exception_del(i);
- else
- return 0;
-}
-
-static int exception_list(User * u, const int index, int *sent_header)
-{
- if (index < 0 || index >= nexceptions)
- return 0;
- if (!*sent_header) {
- notice_lang(s_OperServ, u, OPER_EXCEPTION_LIST_HEADER);
- notice_lang(s_OperServ, u, OPER_EXCEPTION_LIST_COLHEAD);
- *sent_header = 1;
- }
- notice_lang(s_OperServ, u, OPER_EXCEPTION_LIST_FORMAT, index + 1,
- exceptions[index].limit, exceptions[index].mask);
- return 1;
-}
-
-static int exception_list_callback(User * u, int num, va_list args)
-{
- int *sent_header = va_arg(args, int *);
-
- return exception_list(u, num - 1, sent_header);
-}
-
-static int exception_view(User * u, const int index, int *sent_header)
-{
- char timebuf[32], expirebuf[256];
- struct tm tm;
- time_t t = time(NULL);
-
- if (index < 0 || index >= nexceptions)
- return 0;
- if (!*sent_header) {
- notice_lang(s_OperServ, u, OPER_EXCEPTION_LIST_HEADER);
- *sent_header = 1;
- }
-
- tm = *localtime(exceptions[index].time ? &exceptions[index].time : &t);
- strftime_lang(timebuf, sizeof(timebuf),
- u, STRFTIME_SHORT_DATE_FORMAT, &tm);
-
- expire_left(u->na, expirebuf, sizeof(expirebuf),
- exceptions[index].expires);
-
- notice_lang(s_OperServ, u, OPER_EXCEPTION_VIEW_FORMAT,
- index + 1, exceptions[index].mask,
- *exceptions[index].who ?
- exceptions[index].who : "<unknown>",
- timebuf, expirebuf, exceptions[index].limit,
- exceptions[index].reason);
- return 1;
-}
-
-static int exception_view_callback(User * u, int num, va_list args)
-{
- int *sent_header = va_arg(args, int *);
-
- return exception_view(u, num - 1, sent_header);
-}
-
-/*************************************************************************/