KVIrc  4.9.2
DeveloperAPIs
KviKvsCoreSimpleCommands.h
Go to the documentation of this file.
1 #ifndef _KVI_KVS_CORESIMPLECOMMANDS_H_
2 #define _KVI_KVS_CORESIMPLECOMMANDS_H_
3 //=============================================================================
4 //
5 // File : KviKvsCoreSimpleCommands.h
6 // Creation date : Fri 31 Oct 2003 00:04:25 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2003-2010 Szymon Stefanek <pragma at kvirc dot net>
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
27 #include "KviMainWindow.h"
28 #include "KviConsoleWindow.h"
29 #include "kvi_settings.h"
30 #include "KviKvsRunTimeContext.h"
31 #include "KviKvsVariantList.h"
32 #include "KviKvsSwitchList.h"
34 
35 #define KVSCSC(_name) bool _name(KviKvsRunTimeContext * __pContext, KviKvsVariantList * __pParams, KviKvsSwitchList * __pSwitches)
36 
37 #define KVSCSC_pContext __pContext
38 #define KVSCSC_pParams __pParams
39 #define KVSCSC_pSwitches __pSwitches
40 
41 #define KVSCSC_PARAMETER(a, b, c, d) KVS_PARAMETER(a, b, c, d)
42 
43 #define KVSCSC_PARAMETERS_BEGIN \
44  KVS_PARAMETERS_BEGIN(parameter_format_list)
45 
46 #define KVSCSC_PARAMETERS_END \
47  KVS_PARAMETERS_END \
48  if(!KviKvsParameterProcessor::process(KVSCSC_pParams, KVSCSC_pContext, parameter_format_list)) \
49  return false;
50 
51 #define KVSCSC_REQUIRE_CONNECTION \
52  if(!KVSCSC_pContext->window()->context()) \
53  return KVSCSC_pContext->errorNoIrcContext(); \
54  if(!KVSCSC_pContext->window()->connection()) \
55  return KVSCSC_pContext->warningNoIrcConnection();
56 
57 #define KVSCSC_pWindow __pContext->window()
58 #define KVSCSC_pConnection __pContext->window()->connection()
59 #define KVSCSC_pIrcContext __pContext->context()
60 
61 namespace KviKvsCoreSimpleCommands
62 {
63  // a_f
64  KVSCSC(away);
65  KVSCSC(back);
66  KVSCSC(ban);
67  KVSCSC(beep);
68  KVSCSC(buttonctl);
69  KVSCSC(cap);
70  KVSCSC(chanadmin);
71  KVSCSC(chanowner);
72  KVSCSC(ctcp);
73  KVSCSC(debugCKEYWORDWORKAROUND);
74  KVSCSC(dechanadmin);
75  KVSCSC(dechanowner);
76  KVSCSC(dehalfop);
77  KVSCSC(deleteCKEYWORDWORKAROUND);
78  KVSCSC(delpopupitem);
79  KVSCSC(deop);
80  KVSCSC(deuserop);
81  KVSCSC(devoice);
82  KVSCSC(echoprivmsg);
83  KVSCSC(echo);
84  KVSCSC(error);
85  KVSCSC(eval);
86  KVSCSC(eventctl);
87  KVSCSC(exit);
88  // g_l
89  KVSCSC(halfop);
90  KVSCSC(halt);
91  KVSCSC(help);
92  KVSCSC(host);
93  KVSCSC(inject);
94  KVSCSC(join);
95  KVSCSC(kick);
96  KVSCSC(killtimer);
97  KVSCSC(listtimers);
98  // m_r
99  KVSCSC(me);
100  KVSCSC(mode);
101  KVSCSC(nick);
102  KVSCSC(notice);
103  KVSCSC(op);
104  KVSCSC(openurl);
105  KVSCSC(option);
106  KVSCSC(parse);
107  KVSCSC(part);
108  KVSCSC(play);
109  KVSCSC(popup);
110  KVSCSC(privmsg);
111  KVSCSC(query);
112  KVSCSC(quit);
113  KVSCSC(raise);
114  KVSCSC(raw);
115  KVSCSC(returnCKEYWORDWORKAROUND);
116  KVSCSC(rebind);
117  KVSCSC(rfc2812wrapper);
118  KVSCSC(run);
119  // s_z
120  KVSCSC(say);
121  KVSCSC(server);
122  KVSCSC(setmenu);
123  KVSCSC(setreturn);
124  KVSCSC(squery);
125  KVSCSC(srand);
126  KVSCSC(topic);
127  KVSCSC(trload);
128  KVSCSC(trunload);
129  KVSCSC(unban);
130  KVSCSC(userop);
131  KVSCSC(voice);
132  KVSCSC(warning);
133  KVSCSC(who);
134  KVSCSC(whois);
135  KVSCSC(whowas);
136 
137  bool multipleModeCommand(KviKvsRunTimeContext * __pContext, KviKvsVariantList * __pParams, KviKvsSwitchList * __pSwitches, char plusminus, char flag);
138 
139  void init();
140 };
141 
142 #endif
KVIRC_API int run(const QString &url, int contextSpec=FirstFreeContext, KviConsoleWindow *pConsole=0)
Definition: KviIrcUrl.cpp:212
Class to handle variant variables lists.
Definition: KviKvsVariantList.h:41
KVIRC_API void join(QString &url, KviIrcServer *server)
Definition: KviIrcUrl.cpp:147
void quit()
Definition: winamp.cpp:125
Definition: KviKvsSwitchList.h:33
bool multipleModeCommand(KviKvsRunTimeContext *__pContext, KviKvsVariantList *__pParams, KviKvsSwitchList *__pSwitches, char plusminus, char flag)
Definition: KviKvsCoreSimpleCommands.cpp:150
void warning(QString fmt,...)
Definition: KviMessageBox.cpp:41
void init()
Definition: KviKvsCoreSimpleCommands.cpp:39
Definition: KviKvsRunTimeContext.h:103
KVSCSC(rfc2812wrapper)
Definition: KviKvsCoreSimpleCommands.cpp:262
Parser class to handle variant variables lists.
This file contains compile time settings.
KVIRC_API bool parse(const char *url, KviCString &cmdBuffer, int contextSpec=KVI_IRCURL_CONTEXT_FIRSTFREE)
Definition: KviIrcUrl.cpp:46