12 #include <openssl/ssl.h>
13 #include <openssl/rand.h>
14 #include <openssl/err.h>
18 #define ALARM_TIME 240
20 static inline unsigned admin(const char *host
)
24 return !strcmp(host
, "equestria") || // un1c0rn
25 !strcmp(host
, "friendship.sgu.equ") || // robomint
26 !strcmp(host
, "genres.i.dont.even") || // z0r8
27 !strcmp(host
, "unaffiliated/apologue") || // foxeee
28 !strcmp(host
, "lucky.break") || // Hope
29 !strcmp(host
, "who.needs.pants.anyway") || // foxie
30 !strcmp(host
, "assassin.for.hire") || // foxie
31 !strcmp(host
, "sweetie.belle") || // self
32 strcasestr(host
, owner
); // un1c0rn on other network
36 void (*writeline
)(struct bio
*b
, const char *fmt
, ...)
37 __attribute__ ((__format__ (__printf__
, 2, 3)));
38 int (*fill
)(struct bio
*b
);
39 int (*readline
)(struct bio
*b
, char **line
);
40 int (*poll
)(struct bio
*b
, int timeout
);
42 int fd
, maxlen
, len
, ofs
;
47 void init_hook(struct bio
*b
, const char *target
, const char *self
, unsigned ponify
);
49 void privmsg_hook(struct bio
*b
, const char *prefix
, const char *ident
, const char *host
,
50 const char *const *args
, unsigned nargs
);
52 void command_hook(struct bio
*b
, const char *prefix
, const char *ident
, const char *host
,
53 const char *command
, const char *const *args
, unsigned nargs
);