Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

operserv.c File Reference

Implementation of OperServ. More...

#include "services.h"
#include "nickserv.h"
#include "chanserv.h"
#include "operserv.h"
#include "infoserv.h"
#include "gameserv.h"
#include "clone.h"
#include "hash.h"
#include "log.h"
#include "macro.h"
#include "interp.h"
#include "hash/md5pw.h"

Go to the source code of this file.

Defines

#define SETCLR(var, flag, onoff)
 Set or clear the specified flag from the `bar' bitset.


Functions

void listCloneAlerts (UserList *)
 Send the list of clone alerts to a user /OS TRIGGER LIST.

void sendToOperServ (UserList *nick, char **args, int numargs)
 Parse an OperServ message.

int userOverriding (UserList *nick)
 Is the specified user using /OS override?

cmd_return os_help (UserList *nick, char **args, int numargs)
cmd_return os_setop (UserList *nick, char **args, int numargs)
cmd_return os_akill (UserList *nick, char **args, int numargs)
cmd_return os_tempakill (UserList *nick, char **args, int numargs)
cmd_return os_mode (UserList *nick, char **args, int numargs)
cmd_return os_raw (UserList *nick, char **args, int numargs)
cmd_return os_shutdown (UserList *nick, char **args, int numargs)
cmd_return os_reset (UserList *nick, char **args, int numargs)
 Rehash for services. Reloads the configuration.

cmd_return os_jupe (UserList *nick, char **args, int numargs)
cmd_return os_uptime (UserList *nick, char **args, int numargs)
cmd_return os_timers (UserList *nick, char **args, int numargs)
cmd_return os_sync (UserList *nick, char **args, int numargs)
 DEBUG: Sync the disk copy of services databases.

cmd_return os_clonerule (UserList *nick, char **args, int numargs)
cmd_return os_trigger (UserList *nick, char **args, int numargs)
cmd_return os_match (UserList *nick, char **args, int numargs)
 DEBUG: Match a test string.

cmd_return os_cloneset (UserList *nick, char **args, int numargs)
cmd_return os_remsra (UserList *nick, char **args, int numargs)
cmd_return os_grpop (UserList *nick, char **args, int numargs)
cmd_return os_override (UserList *nick, char **args, int numargs)
cmd_return os_strike (UserList *nick, char **args, int numargs)
 Test command.

cmd_return os_heal (UserList *nick, char **args, int numargs)
cmd_return os_nixghost (UserList *nick, char **args, int numargs)

Variables

u_long counterOldCSFmt = 0
 Counter of number of ChanServ commands interpreted by the old hack.

UserListos_user_override = (UserList *)0
interp::service_cmd_t operserv_commands []
 OperServ command table.

const char * cloneset_bits []
 Possible clone flags.


Detailed Description

Implementation of OperServ.

OperServ-related procedures and commands that effect changes to the global state of services and/or the IRC network

Author:
Chip Norkus

Max Byrd

Greg Poma

James Hess

Date:
1996-2001
Id
operserv.c,v 1.3 2003/10/19 20:26:27 Mysid Exp

Definition in file operserv.c.


Define Documentation

#define SETCLR var,
flag,
onoff   ) 
 

Value:

do {   \
  if (onoff)                            \
    (var) |= (flag);                    \
  else                                  \
    (var) &= ~(flag);                   \
} while (0)
Set or clear the specified flag from the `bar' bitset.

Definition at line 112 of file operserv.c.


Function Documentation

void listCloneAlerts UserList nick  ) 
 

Send the list of clone alerts to a user /OS TRIGGER LIST.

Precondition:
Nick is a pointer to a valid, listed online user.
Postcondition:
An IRC message that no clone alerts are present or a list of clone alerts has been sent for nick.

Definition at line 170 of file clone.c.

References CLONE_ALERT, CLONE_OK, userclonestruct::clones, hostclonestruct::clones, CTime, hostclonestruct::firstUser, hostclonestruct::host, HostClone, userclonestruct::next, pending_alert::next, _userlist::nick, OperServ, pendingAlerts, sSend(), userclonestruct::trigger, hostclonestruct::trigger, userclonestruct::uflags, userclonestruct::user, and UserClone.

cmd_return os_akill UserList nick,
char **  args,
int  numargs
 

Autokill command - for editing the network ban (akill) list

Altered so that AHURTs and Services ignores, akills all fall under this one command instead of having 3 copy-pasted versions of this function that just use different names and list item flags. -Mysid

Definition at line 260 of file operserv.c.

References A_AKILL, OAKILL, and ORAKILL.

cmd_return os_mode UserList nick,
char **  args,
int  numargs
 

String truncates here

Definition at line 553 of file operserv.c.

void sendToOperServ UserList nick,
char **  args,
int  numargs
 

Parse an OperServ message.

Parameters:
tmp Pointer to online user initiating the msesage
args Args of the message, where args[0] is the command and the extra parameters follow
numargs Highest index in the args[] array passed plus 1. so args[numargs - 1] is the highest index that can be safely accessed.

Definition at line 128 of file operserv.c.

References getOpFlags(), isOper(), _userlist::nick, OperServ, RET_FAIL, and sSend().

Referenced by parseLine().


Variable Documentation

const char* cloneset_bits[]
 

Initial value:

 {
  "KILL", "IGNORE", "", "OK", NULL
}
Possible clone flags.

Definition at line 104 of file operserv.c.


Generated at Sat Oct 25 20:56:12 2003 for Services using Doxygen.
Services Copyr. 1996-2001 Chip Norkus, Max Byrd, Greg Poma, Michael Graff, James Hess, Dafydd James. All rights reserved See LICENSE for licensing information.