Showing with 21 additions and 15 deletions.
  1. +0 −1 include/foxbot/message.h
  2. +1 −0 include/foxbot/utility.h
  3. +1 −0 plugins/echo_test.c
  4. +1 −0 src/cap.c
  5. +1 −0 src/irc_numeric.c
  6. +1 −0 src/ircd.c
  7. +1 −12 src/message.c
  8. +13 −1 src/utility.c
  9. +2 −1 tests/check_server.c
@@ -44,7 +44,6 @@ struct msg_t {
void hook_numeric(void);
void hook_literal(void);
void call_hooks(void);
char * fox_strsep(char **stringp, const char *delim);
bool parse_line(const char *line);

#endif
@@ -21,3 +21,4 @@
*/

void fox_toupper(char *str);
char * fox_strsep(char **stringp, const char *delim);
@@ -29,6 +29,7 @@
#include <foxbot/message.h>
#include <foxbot/plugin.h>
#include <foxbot/user.h>
#include <foxbot/utility.h>

static void
say_my_name(void)
@@ -28,6 +28,7 @@
#include <foxbot/ircd.h>
#include <foxbot/memory.h>
#include <foxbot/message.h>
#include <foxbot/utility.h>

static struct {
const char *name;
@@ -29,6 +29,7 @@
#include <foxbot/memory.h>
#include <foxbot/parser.h>
#include <foxbot/user.h>
#include <foxbot/utility.h>

static unsigned int
modchar_to_bitflag(const char f)
@@ -34,6 +34,7 @@
#include <foxbot/foxbot.h>
#include <foxbot/parser.h>
#include <foxbot/user.h>
#include <foxbot/utility.h>

/* 001 | RPL_WELCOME */
void
@@ -37,6 +37,7 @@
#include <foxbot/memory.h>
#include <foxbot/message.h>
#include <foxbot/user.h>
#include <foxbot/utility.h>

static int
do_set_enum(const char *command, enum commands ecmd)
@@ -188,18 +189,6 @@ call_hooks(void)
hook_literal();
}

char *
fox_strsep(char **stringp, const char *delim)
{
char *p = *stringp;
if (p) {
char *q = p + strcspn(p, delim);
*stringp = *q ? q + 1 : NULL;
*q = '\0';
}
return p;
}

static void
set_if_channel()
{
@@ -21,11 +21,23 @@
*/

#include <ctype.h>
#include <stddef.h>
#include <string.h>

void
fox_toupper(char *str)
{
for (size_t ii = 0; str[ii]; ++ii)
str[ii] = toupper(str[ii]);
}

char *
fox_strsep(char **stringp, const char *delim)
{
char *p = *stringp;
if (p) {
char *q = p + strcspn(p, delim);
*stringp = *q ? q + 1 : NULL;
*q = '\0';
}
return p;
}
@@ -35,10 +35,11 @@
#include <unistd.h>

#include <foxbot/conf.h>
#include <foxbot/foxbot.h>
#include <foxbot/memory.h>
#include <foxbot/message.h>
#include <foxbot/rope.h>
#include <foxbot/foxbot.h>
#include <foxbot/utility.h>

#include "check_foxbot.h"
#include "check_server.h"