| 1 | // ScriptCommands.H -*- C++ -*- |
| 2 | // Copyright (c) 1998 Etienne BERNARD |
| 3 | // Copyright (c) 2002 Clinton Ebadi |
| 4 | |
| 5 | // This program is free software; you can redistribute it and/or modify |
| 6 | // it under the terms of the GNU General Public License as published by |
| 7 | // the Free Software Foundation; either version 2 of the License, or |
| 8 | // any later version. |
| 9 | |
| 10 | // This program is distributed in the hope that it will be useful, |
| 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | // GNU General Public License for more details. |
| 14 | |
| 15 | // You should have received a copy of the GNU General Public License |
| 16 | // along with this program; if not, write to the Free Software |
| 17 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 18 | // 02110-1301, USA. |
| 19 | |
| 20 | #ifndef SCRIPTCOMMANDS_H |
| 21 | #define SCRIPTCOMMANDS_H |
| 22 | |
| 23 | #ifdef HAVE_CONFIG_H |
| 24 | #include "config.h" |
| 25 | #endif |
| 26 | |
| 27 | #ifdef USESCRIPTS |
| 28 | |
| 29 | #include <libguile.h> |
| 30 | |
| 31 | #include <functional> |
| 32 | |
| 33 | class User; |
| 34 | |
| 35 | class ScriptCommands { |
| 36 | public: |
| 37 | static SCM Action(SCM, SCM); |
| 38 | static SCM AddUser(SCM, SCM, SCM, SCM, SCM, SCM, SCM); |
| 39 | static SCM AddServer(SCM, SCM); |
| 40 | static SCM AddShit(SCM, SCM, SCM, SCM, SCM); |
| 41 | static SCM Ban(SCM, SCM); |
| 42 | static SCM ChangeCommandLevel(SCM, SCM); |
| 43 | static SCM ChannelUsers (SCM); |
| 44 | static SCM CTCP(SCM, SCM, SCM); |
| 45 | static SCM CTCPReply(SCM, SCM, SCM); |
| 46 | static SCM Cycle(SCM); |
| 47 | static SCM Deban(SCM, SCM); |
| 48 | static SCM DelServer(SCM); |
| 49 | static SCM DelUser(SCM, SCM); |
| 50 | static SCM DelShit(SCM, SCM); |
| 51 | static SCM Deop(SCM, SCM); |
| 52 | static SCM Die(SCM); |
| 53 | static SCM Do(SCM); |
| 54 | static SCM Invite(SCM, SCM); |
| 55 | static SCM Join(SCM, SCM); |
| 56 | static SCM Keep(SCM, SCM); |
| 57 | static SCM Kick(SCM, SCM, SCM); |
| 58 | static SCM KickBan(SCM, SCM, SCM); |
| 59 | static SCM Lock(SCM); |
| 60 | static SCM LogPort(void); |
| 61 | static SCM Mode(SCM, SCM); |
| 62 | static SCM Msg(SCM, SCM); |
| 63 | static SCM NextServer(void); |
| 64 | static SCM Nick(SCM); |
| 65 | static SCM Notice (SCM, SCM); |
| 66 | static SCM Op(SCM, SCM); |
| 67 | static SCM Part(SCM); |
| 68 | static SCM Reconnect(void); |
| 69 | static SCM Say(SCM, SCM); |
| 70 | static SCM Server(SCM); // ACK NAMING CLASH |
| 71 | static SCM SetFloodRate(SCM); |
| 72 | static SCM SetVersion(SCM); |
| 73 | static SCM TBan(SCM, SCM, SCM); |
| 74 | static SCM TKBan(SCM, SCM, SCM, SCM); |
| 75 | static SCM Topic(SCM, SCM); |
| 76 | static SCM Unlock(SCM); |
| 77 | static SCM Who(SCM); |
| 78 | static SCM Whois(SCM); |
| 79 | |
| 80 | static SCM getNickname(void); |
| 81 | static SCM getReleaseRevision(void); |
| 82 | static SCM getServer(void); |
| 83 | static SCM getServerList(void); |
| 84 | static SCM getVersion(void); |
| 85 | static SCM flushQueue(void); |
| 86 | static SCM flushPort(void); |
| 87 | static SCM random(SCM); |
| 88 | static SCM addCommand(SCM, SCM, SCM, SCM, SCM); |
| 89 | static SCM delCommand(SCM); |
| 90 | static SCM AddHook(SCM, SCM, SCM, SCM, SCM, SCM); |
| 91 | static SCM AddTimer(SCM, SCM); |
| 92 | static SCM DelTimer(SCM); |
| 93 | |
| 94 | // DCC CHAT |
| 95 | static SCM sendDCCChatMessage (SCM, SCM); |
| 96 | |
| 97 | /* |
| 98 | SCM sendChannelMode(SCM); |
| 99 | SCM sendChannelMode(SCM, SCM, SCM); |
| 100 | SCM sendInvite(SCM, SCM); |
| 101 | SCM sendJoin(SCM, SCM); |
| 102 | SCM sendKick(SCM, SCM, SCM); |
| 103 | SCM sendNick(SCM); |
| 104 | */ |
| 105 | /* |
| 106 | SCM sendPart(SCM); |
| 107 | SCM sendPass(SCM); |
| 108 | SCM sendPing(SCM); |
| 109 | SCM sendPong(SCM); |
| 110 | SCM sendPrivmsg(SCM, SCM); |
| 111 | SCM sendQuit(SCM); |
| 112 | SCM sendTopic(SCM, SCM); |
| 113 | SCM sendUser(SCM, SCM); |
| 114 | SCM sendUserMode(SCM, SCM); |
| 115 | SCM sendUserhost(SCM); |
| 116 | SCM sendWho(SCM); |
| 117 | SCM sendWhois(SCM); |
| 118 | */ |
| 119 | private: |
| 120 | struct collect_channel_users : std::binary_function<SCM*, User, void> |
| 121 | { |
| 122 | void operator() (SCM*, User) const; |
| 123 | }; |
| 124 | }; |
| 125 | |
| 126 | #endif |
| 127 | #endif |