ekg2  GIT master
input.h
Idź do dokumentacji tego pliku.
1 /*
2  * (C) Copyright 2004-2005 Michal 'GiM' Spadlinski <gim at skrzynka dot pl>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License Version 2 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16  */
17 
18 #ifndef __EKG_PLUGINS_IRC_INPUT_H
19 #define __EKG_PLUGINS_IRC_INPUT_H
20 
21 #include "irc.h"
22 
23 char *irc_ircoldcolstr_juststrip(session_t *sess, char *inp);
24 char *irc_ircoldcolstr_to_ekgcolstr(session_t *s, char *str, int strip);
25 char *irc_ircoldcolstr_to_ekgcolstr_nf(session_t *sess, char *str, int strip);
26 char *ctcp_parser(session_t *sess, int ispriv, char *sender, char *recp, char *s, int to_us);
27 
28 
29 #define CTCP_COMMAND(x) static int x(session_t *s, irc_private_t *j, int number, \
30  char *ctcp, char *sender, char*idhost, char *targ, int to_us)
31 typedef int (*CTCP_Cmd) (session_t *s, irc_private_t *j, int number,
32  char *ctcp, char *sender, char *idhost, char *targ);
33 
34 typedef struct {
35  char *name;
36  int handled;
37 } ctcp_t;
38 
41 
42 static const ctcp_t ctcps[] = {
43  { "ACTION", 1 },
44  { "DCC", 0 },
45  { "SED", 0 },
46 
47  { "FINGER", 1 },
48  { "VERSION", 1 },
49  { "SOURCE", 1 },
50  { "USERINFO", 1 },
51  { "CLIENTINFO", 1 },
52  { "PING", 1 },
53  { "TIME", 1 },
54  { "ERRMSG", 1 },
55  { NULL, 0 }
56 };
57 
58 #endif
59 
60 /*
61  * Local Variables:
62  * mode: c
63  * c-file-style: "k&r"
64  * c-basic-offset: 8
65  * indent-tabs-mode: t
66  * End:
67  */
char * irc_ircoldcolstr_to_ekgcolstr_nf(session_t *sess, char *str, int strip)
Definition: input.c:106
Definition: input.h:39
Definition: sessions.h:127
Definition: input.h:39
Definition: input.h:39
Definition: input.h:40
Definition: input.h:34
char * irc_ircoldcolstr_to_ekgcolstr(session_t *s, char *str, int strip)
Definition: input.c:167
Definition: input.h:39
int(* CTCP_Cmd)(session_t *s, irc_private_t *j, int number, char *ctcp, char *sender, char *idhost, char *targ)
Definition: input.h:31
int handled
Definition: input.h:36
#define NULL
Definition: oralog.c:49
Definition: input.h:40
Definition: input.h:40
Definition: input.h:40
Definition: input.h:40
Definition: input.h:39
char * ctcp_parser(session_t *sess, int ispriv, char *sender, char *recp, char *s, int to_us)
Definition: input.c:207
guint32 sender
Definition: sniff_gg.h:166
char * name
Definition: input.h:35
char * irc_ircoldcolstr_juststrip(session_t *sess, char *inp)
Definition: input.c:76
Definition: input.h:39
#define s
Definition: irc.h:30
static const ctcp_t ctcps[]
Definition: input.h:42