1 /* 2 * ------------------------------------------------------- 3 * Copyright (C) 2002-2007 Tommi Saviranta <wnd@iki.fi> 4 * (C) 1998-2002 Sebastian Kienzl <zap@riot.org> 5 * ------------------------------------------------------- 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 */ 16 17 #ifndef MESSAGES_H_ 18 #define MESSAGES_H_ 19 20 #ifdef HAVE_CONFIG_H 21 #include <config.h> 22 #endif /* ifdef HAVE_CONFIG_H */ 23 24 25 26 /* 27 * General 28 */ 29 #define IRCLF "\r\n" 30 31 #ifdef MKPASSWD 32 #define OPT_CRYPT_L " -c\t\tCreate crypted password\n" 33 #define OPT_CRYPT_S "[-c] " 34 #else 35 #define OPT_CRYPT_L "" 36 #define OPT_CRYPT_S "" 37 #endif 38 39 #define SYNTAX "\ 40 Usage: %s [-f] "OPT_CRYPT_S"[-d dir]\n\ 41 -f\t\tStay in foreground\n\ 42 -d dir\tOther directory than default for miau-files\n\ 43 -v\t\tPrint version and copyright information and exit\n\ 44 "OPT_CRYPT_L 45 46 /* 47 * Parsing-section. 48 */ 49 #define PARSE_SE "Parse error on line %d!" 50 #define PARSE_MK "'%s' has not been set!" 51 #define PARSE_NOSERV "No servers have been specified!" 52 53 /* 54 * miau-messages. 55 */ 56 #define MIAU_WELCOME "Welcome to miau (not connected to server)" 57 #define MIAU_PARSING "Parsing configuration file..." 58 #define MIAU_ERRCFG "Unable to open miaurc in %s!" 59 #define MIAU_ERRNEEDARG "Option -%c requires an argument!" 60 #define MIAU_ERRNOHOME "$HOME is not set! (set it or use -d)" 61 #define MIAU_ERRFILE "Can't write to \"%s\"!" 62 #define MIAU_ERRCHDIR "Can't chdir to \"%s\"!" 63 #define MIAU_ERRLOGDIR "\"%s\" not a directory!" 64 #define MIAU_ERRCREATELOGDIR "Can't create \"%s\"!" 65 #define MIAU_ERREXIT "Terminating..." 66 #define MIAU_SIGTERM "Caught sigterm, terminating..." 67 #define MIAU_OUTOFSERVERS "Out of servers, terminating..." 68 #define MIAU_OUTOFSERVERSNEVER "Out of servers, retrying..." 69 #define MIAU_ERRFORK "Unable to fork!" 70 #define MIAU_FORKED "miau's forked. (pid %d)" 71 #define MIAU_ERRINBOXFILE "Can't open inbox, inbox disabled." 72 #define MIAU_LEAVING "Leaving channels." 73 #define MIAU_REINTRODUCE "Reintroducing channels." 74 #define MIAU_JOINING "Autojoining channels (%s)." 75 #define MIAU_JOIN_QUEUE "Queued joining channel %s" 76 #define MIAU_JUMP "Changing server..." 77 #define MIAU_RECONNECT "Reconnecting to server..." 78 #define MIAU_DIE_CL "killed" 79 #define MIAU_READ_RC "Configuration read." 80 #define MIAU_RESET "Reseted all servers to working." 81 #define MIAU_NICK "miau's nick is '%s'." 82 #define MIAU_GOTNICK "Got nick '%s'!" 83 #define MIAU_NEWSESSION "---------- NEW SESSION ----------" 84 #define MIAU_STARTINGLOG "miau version "VERSION" - starting log..." 85 #define MIAU_CLOSINGLINK "ERROR: Closing link: %s" 86 #define MIAU_USERKILLED "ERROR: "CLNT_DIE" %s" 87 #define MIAU_LOGNOWRITE "Cannot write to logfile \"%s\"!" 88 89 #define MIAU_VERSION "- miau version "VERSION" - \""VERSIONNAME"\" -" 90 #define MIAU_372_RUNNING "- Running on server %s with nickname %s" 91 #define MIAU_372_NOT_CONN "- Not connected to server" 92 #define MIAU_END_OF_MOTD "End of /MOTD command." 93 #define MIAU_ERRLOGCONN "Can't write to logfile, disabling logging." 94 95 /* releasenick */ 96 #ifdef RELEASENICK 97 #define MIAU_RELEASENICK "Having nick '%s' for %d second(s)" 98 #endif /* RELEASENICK */ 99 100 /* uptime */ 101 #ifdef UPTIME 102 #define MIAU_UPTIME "miau has been online: %dd %02dh %02dm %02ds" 103 #define CMD_UPTIME ", UPTIME" 104 #else /* UPTIME */ 105 #define CMD_UPTIME "" 106 #endif /* UPTIME */ 107 108 /* pingstat */ 109 #ifdef PINGSTAT 110 #define CMD_PINGSTAT ", PINGSTAT" 111 #else /* PINGSTAT */ 112 #define CMD_PINGSTAT "" 113 #endif /* PINGSTAT */ 114 115 /* dumpstatus */ 116 #ifdef DUMPSTATUS 117 #define CMD_DUMP ", DUMP" 118 #else /* DUMPSTATUS */ 119 #define CMD_DUMP "" 120 #endif /* DUMPSTATUS */ 121 122 /* quicklog */ 123 #ifdef QUICKLOG 124 #define MIAU_FLUSHQLOGALL "Quicklog flushed" 125 #define MIAU_FLUSHQLOG "Flushed quicklog older than " \ 126 "%d day(s), %d hour(s), %d minute(s)" 127 #define CMD_FLUSHQLOG ", QUICKLOG [[[days:]hours:]minutes], FLUSHQLOG [[[days:]hours:]minutes]" 128 #else /* ifdef QUICKLOG */ 129 #define CMD_FLUSHQLOG "" 130 #endif /* ifdef else QUICKLOG */ 131 132 /* mkpasswd */ 133 #ifdef MKPASSWD 134 #define MIAU_ENTERPASS "Enter password to crypt: " 135 #define MIAU_THISPASS "Set this as password in your miaurc: %s\n\n" 136 #endif /* MKPASSWD */ 137 138 #define MIAU_URL "http://miau.sf.net/" 139 #define BANNER "\ 140 miau v"VERSION" \""VERSIONNAME"\"\n\ 141 "MIAU_URL"\n\ 142 Copyright (C) 2002-2006 Tommi Saviranta <wnd@iki.fi>\n\ 143 (C) 2002 Lee Hardy <lee@leeh.co.uk>\n\ 144 (C) 1998-2002 Sebastian Kienzl <zap@riot.org>\n\ 145 \n\ 146 This is free software; see the GNU General Public Licence version 2 or\n\ 147 later for copying conditions. There is NO warranty.\n\ 148 Read 'COPYING' for copyright and licence details.\n" 149 150 /* 151 * Socket-messages. 152 */ 153 #define SOCK_GENERROR "General socket error (%s)!" 154 #define SOCK_ERROPEN "Unable to create socket! (%s)" 155 #define SOCK_ERRBIND "Unable to bind to port %d! (%s)" 156 #define SOCK_ERRBINDHOST "Unable to bind to '%s':%d! (%s)" 157 #define SOCK_ERRLISTEN "Unable to listen!" 158 #define SOCK_ERRACCEPT "Unable to accept connection from '%s'!" 159 #define SOCK_LISTENOK "Listening on port %d." 160 #define SOCK_LISTENOKHOST "Listening on host %s/port %d." 161 #define SOCK_CONNECT "TCP-connection to '%s' established!" 162 #define SOCK_ERRRESOLVE "Unable to resolve '%s'!" 163 #define SOCK_ERRCONNECT "Unable to connect to '%s'! (%s)" 164 #define SOCK_ERRWRITE "Error while sending data to '%s'!" 165 #define SOCK_RECONNECT "Trying to reconnect to '%s' in %d seconds." 166 #define SOCK_RECONNECTNOW "Trying to reconnect to '%s'." 167 #define SOCK_ERRTIMEOUT "Connection timeout" 168 169 /* 170 * IRC-messages. 171 */ 172 #define IRC_CONNECTED "Connected to '%s'." 173 #define IRC_BADNICK "'%s' is an invalid nick - using '%s'." 174 #define IRC_NICKINUSE "Nick '%s' is in use - using '%s'." 175 #define IRC_NICKUNAVAIL "Nick '%s' unavailable - using '%s'." 176 #define IRC_SERVERERROR "Server-error! (%s)" 177 #define IRC_KILL "You've been killed by '%s'!" 178 #define IRC_AWAY "You have been marked as being away" 179 #define IRC_NOSUCHCHAN "No such channel" 180 181 /* 182 * Client-related -messages. 183 */ 184 #define CLNT_AUTHFAIL "Authorization failed!" 185 #define CLNT_AUTHTO "New client timed out while authorizing!" 186 #define CLNT_AUTHFAILNOTICE "Unsuccessful connect-attempt from '%s'!" 187 #define CLNT_AUTHOK "Authorization successful!" 188 #define CLNT_LEFT "Client signed off." 189 #define CLNT_DROP "Dropped old client." 190 #define CLNT_DIE "Killed by user: " 191 #define CLNT_STONED "Disconnected stoned client." 192 #define CLNT_CLIENTS "%d client(s) connected." 193 #define CLNT_SERVINFO "Disconnected client to update server info" 194 195 #define CLNT_HAVEMSGS "\2You have messages waiting.\2 (/miau read)" 196 #define CLNT_INBOXEMPTY "Your inbox is empty." 197 #define CLNT_KILLEDMSGS "Killed your messages." 198 199 #define CLNT_CAUGHT "Client from '%s'." 200 #define CLNT_DENIED "Denied client from '%s'." 201 #define CLNT_DROPPED "Client dropped connection." 202 #define CLNT_DROPPEDUNAUTH "Client dropped connection while authorizing." 203 204 #define CLNT_CTCP "Received a CTCP %s from %s." 205 #define CLNT_CTCPNOREPLY "Received a CTCP %s from %s. (didn't reply)" 206 #define CLNT_KICK "%s kicked me out of %s (%s)!" 207 208 #define CLNT_NOTCONNECT "Not connected to server." 209 210 /* 211 * Server-related -messages. 212 */ 213 #define SERV_ERR "Closed connection after server reported error." 214 #define SERV_STONED "Disconnecting from stoned server." 215 #define SERV_TRYING "Trying server '%s' on port %d..." 216 #define SERV_DROPPED "Server dropped connection!" 217 #define SERV_RESTRICTED "Connection is restricted, jumping..." 218 #define SERV_DISCONNECT "Disconnected from server." 219 220 221 /* 222 * Client-side -messages. 223 */ 224 #ifdef CTCPREPLIES 225 #define VERSIONREPLY "\1VERSION miau v"VERSION" \""VERSIONNAME"\" -- "MIAU_URL"\1" 226 #define CLIENTINFOREPLY "\1CLIENTINFO VERSION PING CLIENTINFO ACTION\1" 227 #endif /* CTCPREPLIES */ 228 229 #define CLNT_COMMANDS "Available commands: HELP, READ, DEL, JUMP [n], " \ 230 "REHASH, RESET, DIE, PRINT" \ 231 CMD_FLUSHQLOG CMD_UPTIME CMD_PINGSTAT CMD_DUMP 232 #define CLNT_INBOXSTART "Playing inbox..." 233 #define CLNT_INBOXEND "End of inbox." 234 #define CLNT_NEWCLIENT "New connection established!" 235 #define CLNT_RESTRICTED "restricted connection" 236 #define CLNT_SERVLIST "Servers:" 237 #define CLNT_NOSERVERS PARSE_NOSERV 238 #define CLNT_MIAURCBEENWARNED "Incomplete miaurc! YOU HAVE BEEN WARNED!" 239 #define CLNT_CURRENT "Current server is %d%s." 240 #define CLNT_ANDCONNECTING " (connecting)" 241 #define CLNT_CONNECTING "Connecting to server..." 242 243 /* 244 * DCC-bouncing. 245 */ 246 #ifdef DCCBOUNCE 247 #define DCC_SUCCESS "DCC: Bounce from %s established! [%d]" 248 #define DCC_TIMEOUT "DCC: Bounce timed out! [%d]" 249 #define DCC_ERRCONNECT "DCC: Can't connect peer! (%s) [%d]" 250 #define DCC_ERRACCEPT "DCC: Can't accept incoming! (%s) [%d]" 251 #define DCC_ERRSOCK "DCC: Socket-error! (%s) [%d]\n" 252 #define DCC_START "DCC: Starting bounce to %s:%d! [%d]" 253 #define DCC_END "DCC: Ending bounce [%d]" 254 #endif /* DCCBOUNCE */ 255 256 /* 257 * Logging, 258 */ 259 #define LOGM_JOIN "%s --> %s (%s) has joined %s\n" 260 #define LOGM_PART "%s <-- %s has left %s (%s)\n" 261 #define LOGM_QUIT "%s <-- %s has quit (%s%s%s)\n" 262 #define LOGM_KICK "%s <-- %s was kicked by %s (%s)\n" 263 #define LOGM_MODE "%s --- %s sets mode %s\n" 264 #define LOGM_MESSAGE "%s <%s> %s\n" 265 #define LOGM_ACTION "%s * %s %s\n" 266 #define LOGM_NOTICE "%s >%s< %s\n" 267 #define LOGM_TOPIC "%s --- %s has changed the topic to: %s\n" 268 #define LOGM_NICK "%s --- %s is now known as %s\n" 269 #define LOGM_MIAU "%s --- client %sconnected\n" 270 #define LOGM_LOGOPEN "**** BEGIN LOGGING AT %s\n" 271 #define LOGM_LOGCLOSE "**** ENDING LOGGING AT %s\n\n" 272 273 /* 274 * quicklog, 275 */ 276 #ifdef QUICKLOG 277 #define CLNT_QLOGSTART "Playing quicklog..." 278 #define CLNT_QLOGEND "End of quicklog." 279 #endif /* QUICKLOG */ 280 281 /* 282 * quicklog to inbox, 283 */ 284 #ifdef QLOGTOMSGLOG 285 #define QLOGM_PRIVMSG "<%s/%s> %s\n" 286 #define QLOGM_GENERAL "%s\n" 287 #define QLOGM_LEAVE "Forced to leave the channel" 288 #endif /* QLOGTOMSGLOG */ 289 290 /* 291 * General error-message. 292 */ 293 #define ERR_CANT_ATEXIT "Couldn't set atexit()!" 294 #define ERR_MEMORY "Out of memory, terminating!" 295 #define ERR_UNEXPECTED "!!! An unexpected situation occured, please send us this: [%s, %s:%d]\n" 296 297 298 /* 299 * Ping statistics. 300 */ 301 #ifdef PINGSTAT 302 #define PING_NO_PINGS "No pings" 303 #define PING_STAT "Pings sent/got: %d/%d - %d %% loss" 304 #endif /* PINGSTAT */ 305 306 307 308 #endif /* ifndef MESSAGE_H_ */ 309