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

gameserv.c File Reference

GameServ implementation. More...

#include "services.h"
#include "nickserv.h"
#include "chanserv.h"
#include "log.h"
#include "interp.h"

Go to the source code of this file.

Functions

void sendToGameServ (UserList *nick, char **args, int numargs)
 Parse a GameServ message.

int dice (int dice, int sides)
 rolls some dice and returns the sum of the rolls

cmd_return gs_help (UserList *nick, char **args, int numargs)
 /msg GameServ help

cmd_return gs_roll (UserList *nick, char **args, int numargs)

Variables

interp::service_cmd_t gameserv_commands []
 Dispatch table for GameServ commands.


Detailed Description

GameServ implementation.

Author:
James Mulcahy
Date:
1999
Id
gameserv.c,v 1.1.1.1 2003/07/04 02:53:45 Mysid Exp

Definition in file gameserv.c.


Function Documentation

int dice int  num,
int  sides
 

rolls some dice and returns the sum of the rolls

Parameters:
num The number of dice to roll
sides The number of sides on the dice
Returns:
Result of rolling dice D sides
Side Effects:
Changes the random seed in use for generation of numbers

Definition at line 112 of file gameserv.c.

References dice().

Referenced by dice(), gs_roll(), and guest_cnick().

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

[Frequency] # [Number of Dice] D [Number of sides] +/- [Modifier] ^^^^^^^^^^^^^^^^^ Only the number of sides is mandatory.

Definition at line 152 of file gameserv.c.

References addFlood(), dice(), GameServ, getChanData(), getChanOp(), getChanUserData(), isRoot(), chanlist_struct::reg, RET_EFAULT, RET_KILLED, RET_NOTARGET, RET_OK, RET_SYNTAX, and sSend().

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

Parse a GameServ 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 69 of file gameserv.c.

References GameServ, gameserv_commands, getOpFlags(), _userlist::nick, RET_FAIL, and sSend().

Referenced by parseLine().


Variable Documentation

interp::service_cmd_t gameserv_commands[]
 

Initial value:

 {
    
    {   "help", gs_help, 0, LOG_NO, 0, 1},
    {   "roll", gs_roll, 0, LOG_NO, 0, 1},
    {   NULL    },
}
Dispatch table for GameServ commands.

Definition at line 49 of file gameserv.c.

Referenced by sendToGameServ().


Generated at Sat Oct 25 20:56:11 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.