#include "services.h"
#include "hash.h"
#include "nickserv.h"
#include "log.h"
Go to the source code of this file.
Defines | |
#define | HOSTMAX (HOSTLEN + 1) |
#define | IrcStr(point) ((!*(point)) ? "*" : (point)) |
Functions | |
void | breakString (int numargs, char *string, char **args, char delimiter) |
Splits a string into a vector across a delimeter. | |
int | match (const char *mask, const char *string) |
Matches a string against the specified pattern for wildcards \ as allowed done by IRC clients/servers. | |
void | strtolower (char *str) |
Lowercases a NUL-terminated string in place. | |
char * | sfgets (char *str, int len, FILE *fp) |
char * | xorit (char *tocrypt) |
Encrypt a password string. | |
void | parse_str (char **args, int argc, int startarg, char *workingstring, size_t sz) |
Merge a vector of strings into one string across delimeters. | |
void | mask (char *user, char *host, int type, char *where) |
This function is used by the NickServ ADDMASK command. | |
void * | oalloc (size_t size) |
Clean and allocate a memory area. | |
char * | flagstring (int flags, const char *bits[]) |
Report the names of bits set. | |
int | flagbit (char *name, const char *bits[]) |
void | tzapply (char *to) |
char * | tokenEncode (char *str) |
Applies the mask (string) hashing algorithm to a token. | |
char * | genHostMask (char *host) |
Returns the masked version of a host. | |
char * | str_dup (const char *input) |
Allocates and returns a copy of the supplied string. | |
char * | strn_dup (const char *input, int max) |
Allocates and returns a copy of part of the supplied string. | |
MaskData * | make_mask () |
Allocates a mask structure. | |
void | free_mask (MaskData *mask) |
Frees a mask structure. | |
int | split_userhost (const char *input_host, MaskData *data) |
Splits a string into a supplied mask structure. | |
void | AppendBuffer (char **buf, const char *add) |
void | SetDynBuffer (char **buf, const char *newStr) |
char * | urlEncode (const char *in) |
void | rshift_argv (char **args, int x, int numargs) |
Max Byrd
Greg Poma
James Hess
Definition in file stuff.c.
|
Definition at line 744 of file stuff.c. References oalloc(). Referenced by dbReadString(). |
|
Splits a string into a vector across a delimeter.
|
|
|
|
Report the names of bits set.
|
|
Frees a mask structure.
Definition at line 646 of file stuff.c. References mask(). |
|
Returns the masked version of a host.
Definition at line 521 of file stuff.c. References FALSE, tokenEncode(), and TRUE. Referenced by addUserToChan(), getMiscChanOp(), IpcType::queryRegNickMessage(), and regnick_ugethost(). |
|
This function is used by the NickServ ADDMASK command.
Definition at line 355 of file stuff.c. Referenced by addAccessMask(), addakill(), autoremoveakill(), banKick(), delAccessMask(), free_mask(), GetCrule(), listAkills(), loadakills(), make_mask(), match(), ns_addmask(), queueakill(), removeAkill(), and removeAkillType(). |
|
Matches a string against the specified pattern for wildcards \ as allowed done by IRC clients/servers.
Compare if a given string (name) matches the given mask. A wildcard match can be made, '*' matches any number of characters and '?' matches any single character. Additionally, wildcards can be escaped with a preceding \. return 0, if match 1, if no match
Definition at line 129 of file stuff.c. References mask(). Referenced by addUserToChan(), checkAccess(), checkAkillAllUsers(), do_chanop_list(), GetCruleMatch(), getMiscChanOp(), isAHurt(), isAKilled(), isIgnored(), isQlined(), and UpdateCrule(). |
|
Clean and allocate a memory area.
Definition at line 404 of file stuff.c. References sshutdown(). Referenced by addakill(), addClone(), addGhost(), addNewUser(), addOpData(), addRegNick(), addUserClone(), addUserToChan(), AppendBuffer(), banKick(), changeNick(), changeNickOnAllChans(), detect_mass(), dlogInit(), fromBase64(), help(), is_postnews(), loadakills(), make_mask(), make_palert(), MakeChannelTrigger(), IpcType::makeMessage(), NewCrule(), IpcType::pollAndHandle(), readChanData(), readInfoData(), readMemoData(), readNickData(), setChanMode(), SetDynBuffer(), setIdentify(), str_dup(), strn_dup(), timer(), and toBase64(). |
|
Merge a vector of strings into one string across delimeters.
this function is the reverse of the original breakString Definition at line 318 of file stuff.c. Referenced by adCheck(), addNewUser(), help(), is_postnews(), and setChanTopic(). |
|
Definition at line 774 of file stuff.c. References oalloc(). Referenced by IpcType::authObjMessage(), IpcType::authSysMessage(), freeRegNickListRec(), freeUserListRec(), IpcType::makeMessage(), NickSeeUser(), ns_addmask(), readNickData(), and SetUserNickHostReal(). |
|
Splits a string into a supplied mask structure.
Definition at line 664 of file stuff.c. References corelog, mask_structure::host, logDump(), mask_structure::nick, str_dup(), strn_dup(), and mask_structure::user. |
|
Allocates and returns a copy of the supplied string.
Definition at line 597 of file stuff.c. References oalloc(). Referenced by IpcType::authObjMessage(), IpcType::authSysMessage(), dbWriteString(), is_sendinfo(), MakeChannelTrigger(), and split_userhost(). |
|
Allocates and returns a copy of part of the supplied string.
Definition at line 614 of file stuff.c. References oalloc(). Referenced by split_userhost(). |
|
Applies the mask (string) hashing algorithm to a token.
Definition at line 503 of file stuff.c. Referenced by genHostMask(). |
|
Encrypt a password string.
Definition at line 286 of file stuff.c. References strncpyzt. Referenced by readChanData(), readNickData(), saveChanData(), and saveNickData(). |