diff --git a/default.bigchars b/default.bigchars index 7fafbcf..a89033c 100644 --- a/default.bigchars +++ b/default.bigchars @@ -29,7 +29,17 @@ chars | | | | | | | -| | +| | +| | +`--' + +chars : + +,--. +| | +`--' + +,--. | | `--' @@ -257,7 +267,8 @@ chars xX ,--. ,-. \ \ / / \ \/ / - ) ( + \ / + / \ / /\ \ / / \ \ `-' `--' @@ -271,3 +282,13 @@ chars yY \ | | | |,--' + +chars zZ + ,--------. + \____ | + / / + / / + / / + / /___ + / | +`---------' diff --git a/src/debug.c b/src/debug.c index 969446f..0bcb9a1 100644 --- a/src/debug.c +++ b/src/debug.c @@ -761,6 +761,9 @@ void debug_core(void) Spy *spy; Strp *st; Shit *shit; +#ifdef TOYBOX + BigC *bigc; +#endif /* TOYBOX */ #ifdef TRIVIA TrivScore *triv; #endif /* TRIVIA */ @@ -797,6 +800,7 @@ void debug_core(void) debug("> servergrouplist\t"mx_pfmt"\n",(mx_ptr)servergrouplist); for(sg=servergrouplist;sg;sg=sg->next) { + memtouch(sg); debug(" ; next\t\t"mx_pfmt"\n",(mx_ptr)sg->next); debug(" ; servergroup\t\t%i\n",sg->servergroup); debug(" ; name\t\t\"%s\"\n",nullbuf(sg->name)); @@ -1158,6 +1162,26 @@ void debug_core(void) debug(" ; ---\n"); } #endif /* SEEN */ +#ifdef TOYBOX + if (fontname) + memtouch(fontname); + debug("; fontname*\t\t"mx_pfmt" { \"%s\" }\n", + (mx_ptr)fontname,nullstr(fontname)); + debug("> fontlist\t\t"mx_pfmt"\n",(mx_ptr)fontlist); + for(bigc=fontlist;bigc;bigc=bigc->next) + { + memtouch(bigc); + debug(" ; width\t\t%i\n",bigc->width); + debug(" ; chars\t\t\"%s\"\n",bigc->chars); + debug(" > data\t\t"mx_pfmt"\n",(mx_ptr)bigc->data); + for(st=bigc->data;st;st=st->next) + { + memtouch(st); + debug(" ; Strp*\t\t"mx_pfmt" { "mx_pfmt", \"%s\" }\n", + (mx_ptr)st,(mx_ptr)st->next,st->p); + } + } +#endif /* TOYBOX */ #ifdef TRIVIA debug("> scorelist\t\t"mx_pfmt"\n",(mx_ptr)scorelist); for(triv=scorelist;triv;triv=triv->next) diff --git a/src/function.c b/src/function.c index 5808b4d..d3644ea 100644 --- a/src/function.c +++ b/src/function.c @@ -176,7 +176,7 @@ Strp *make_strp(Strp **pp, const char *string) Strp *append_strp(Strp **pp, const char *string) { - while((*pp)->next != NULL) + while((*pp) != NULL) pp = &((*pp)->next); make_strp(pp,string); return(*pp); diff --git a/src/global.h b/src/global.h index 8e967c8..740f242 100644 --- a/src/global.h +++ b/src/global.h @@ -224,6 +224,13 @@ BEG Seen *seenlist MDEF(NULL); #endif /* SEEN */ +BEG char *fontname MDEF(NULL); +BEG BigC *fontlist MDEF(NULL); +BEG int charlines; +BEG int charheight; +BEG int spacewidth; +BEG int kerning; + #ifdef TRIVIA BEG int triv_qdelay MDEF(30); /* proc var */ @@ -261,7 +268,6 @@ BEG int webport MDEF(0); #endif /* WEB */ - #ifndef I_HAVE_A_LEGITIMATE_NEED_FOR_MORE_THAN_4_BOTS BEG int spawning_lamer MDEF(0); diff --git a/src/settings.h b/src/settings.h index 26a295c..94ed125 100644 --- a/src/settings.h +++ b/src/settings.h @@ -134,10 +134,10 @@ LS const Setting VarName[SIZE_VARS] = { STR_PROC, 100, 0, STRPROC(uptimehost), "UPHOST" }, /* send uptime packets to */ { STR_PROC, 100, 0, STRPROC(uptimenick), "UPNICK" }, /* send as identifier instead of bots nick */ { INT_PROC, 100, 0, INTPROC(uptimeport), "UPPORT", 65535 }, /* send packets to port */ +#endif /* UPTIME */ #ifdef URLCAPTURE { INT_PROC, 100, 0, INTPROC(urlhistmax), "URLHIST", 100 }, /* max # of url's to keep in history */ #endif /* URLCAPTURE */ -#endif /* UPTIME */ { STR_GLOBAL, 90, 0, VNULL, "USERFILE" }, /* what file to load/save userlist from/to */ { STR_GLOBAL, 90, 0, VNULL, "VIRTUAL", 0, (&var_resolve_host) }, /* visual host */ #ifdef WEB diff --git a/src/structs.h b/src/structs.h index 029c31d..844cadf 100644 --- a/src/structs.h +++ b/src/structs.h @@ -46,6 +46,30 @@ typedef union usercombo } usercombo; +typedef struct OnMsg +{ + const char *name; + void (*func)(char *, char *, char *, int); + ulong defaultaccess:8, /* defaultaccess */ + dcc:1, + cc:1, + pass:1, + args:1, + nopub:1, + nocmd:1, + gaxs:1, + caxs:1, + redir:1, + lbuf:1, + cbang:1, + acchan:1, + supres:1; // -- 21 bits + char *cmdarg; + +} OnMsg; + +typedef unsigned char OnMsg_access; + #ifndef GENCMD_C typedef struct ircLink @@ -767,32 +791,6 @@ typedef struct TrivScore } TrivScore; -#endif /* GENCMD_C */ - -typedef struct OnMsg -{ - const char *name; - void (*func)(char *, char *, char *, int); - ulong defaultaccess:8, /* defaultaccess */ - dcc:1, - cc:1, - pass:1, - args:1, - nopub:1, - nocmd:1, - gaxs:1, - caxs:1, - redir:1, - lbuf:1, - cbang:1, - acchan:1, - supres:1; // -- 21 bits - char *cmdarg; - -} OnMsg; - -typedef unsigned char OnMsg_access; - typedef struct dnsAuthority { struct dnsAuthority *next; @@ -827,4 +825,16 @@ typedef struct dnsQuery } dnsQuery; +typedef struct BigC +{ + struct BigC *next; + + int width; + Strp *data; + char chars[1]; + +} BigC; + +#endif /* ifndef GENCMD_C */ + #endif /* STRUCTS_H */ diff --git a/src/toybox.c b/src/toybox.c index 8139b7b..b4c809d 100644 --- a/src/toybox.c +++ b/src/toybox.c @@ -32,30 +32,12 @@ #define BIGSAY_DEFAULTFONT "default" #define FONT_EXTENSION ".bigchars" -typedef struct BigC -{ - struct BigC *next; - - int width; - Strp *data; - char chars[1]; - -} BigC; - -LS char *fontname = NULL; -LS BigC *newchar; - -LS BigC *fontlist = NULL; -LS int charlines; -LS int charheight; -LS int spacewidth; -LS int kerning; - -LS BigC *orig_fontlist = NULL; -LS int orig_charlines; -LS int orig_charheight; -LS int orig_spacewidth; -LS int orig_kerning; +BigC *newchar; +BigC *orig_fontlist = NULL; +int orig_charlines; +int orig_charheight; +int orig_spacewidth; +int orig_kerning; int read_bigcharset_callback(char *rest) { @@ -232,7 +214,7 @@ void do_bigsay(COMMAND_ARGS) sp = bigc->data; for(x=0;xnext; - temp = sp->p; + temp = (sp) ? sp->p : ""; temp2 = tail; while(*temp && tail < OEND) *(tail++) = *(temp++); diff --git a/src/user.c b/src/user.c index a893e6a..f0297f9 100644 --- a/src/user.c +++ b/src/user.c @@ -1249,11 +1249,6 @@ void do_user(COMMAND_ARGS) to_user(from,"Problem adding %s (global mask)",tmpmask); return; } - if (matches("*@?*.?*",tmpmask)) - { - to_user(from,"Problem adding %s (invalid mask)",tmpmask); - return; - } #endif /* NEWBIE */ format_uh(tmpmask,FUH_USERHOST); // format_uh uses local temporary buffer but copies result back into tmpmask /*