ekg2
plugins/irc/input.h
Idź do dokumentacji tego pliku.
00001 /*
00002  *  (C) Copyright 2004-2005 Michal 'GiM' Spadlinski <gim at skrzynka dot pl>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License Version 2 as
00006  *  published by the Free Software Foundation.
00007  *
00008  *  This program is distributed in the hope that it will be useful,
00009  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  *  GNU General Public License for more details.
00012  *
00013  *  You should have received a copy of the GNU General Public License
00014  *  along with this program; if not, write to the Free Software
00015  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00016  */
00017 
00018 #ifndef __EKG_PLUGINS_IRC_INPUT_H
00019 #define __EKG_PLUGINS_IRC_INPUT_H
00020 
00021 #include <ekg/sessions.h>
00022 #include "irc.h"
00023 
00024 char *irc_ircoldcolstr_juststrip(session_t *sess, char *inp);
00025 char *irc_ircoldcolstr_to_ekgcolstr(session_t *s, char *str, int strip);
00026 char *irc_ircoldcolstr_to_ekgcolstr_nf(session_t *sess, char *str, int strip);
00027 char *ctcp_parser(session_t *sess, int ispriv, char *sender, char *recp, char *s);
00028 
00029 
00030 #define CTCP_COMMAND(x) static int x(session_t *s, irc_private_t *j, int number, \
00031                 char *ctcp, char *sender, char*idhost, char *targ)
00032 typedef int (*CTCP_Cmd) (session_t *s, irc_private_t *j, int number,
00033                 char *ctcp, char *sender, char *idhost, char *targ);
00034 
00035 typedef struct {
00036         char *name;
00037         int handled;
00038 } ctcp_t;
00039 
00040 enum { CTCP_ACTION=1, CTCP_DCC, CTCP_SED, CTCP_FINGER, CTCP_VERSION, CTCP_SOURCE,
00041         CTCP_USERINFO, CTCP_CLIENTINFO, CTCP_PING, CTCP_TIME, CTCP_ERRMSG };
00042 
00043 static const ctcp_t ctcps[] = {
00044         { "ACTION",     1 },
00045         { "DCC",        0 },
00046         { "SED",        0 },
00047 
00048         { "FINGER",     1 },
00049         { "VERSION",    1 },
00050         { "SOURCE",     1 },
00051         { "USERINFO",   1 },
00052         { "CLIENTINFO", 1 },
00053         { "PING",       1 },
00054         { "TIME",       1 },
00055         { "ERRMSG",     1 },
00056         { NULL,         0 }
00057 };
00058 
00059 #endif
00060 
00061 /*
00062  * Local Variables:
00063  * mode: c
00064  * c-file-style: "k&r"
00065  * c-basic-offset: 8
00066  * indent-tabs-mode: t
00067  * End:
00068  */
 All Struktury Danych Pliki Funkcje Zmienne Definicje typów Wyliczenia Wartości wyliczeń Definicje