From: <br...@us...> - 2007-11-16 06:58:57
|
Revision: 333 http://libirc.svn.sourceforge.net/libirc/?rev=333&view=rev Author: brlcad Date: 2007-11-15 22:58:55 -0800 (Thu, 15 Nov 2007) Log Message: ----------- s/receve/receive/g Modified Paths: -------------- trunk/libirc/examples/simpleIRCConnect/src/simpleIRCConnect.cpp trunk/libirc/examples/simpleTCPConnect/readme.txt trunk/libirc/examples/spamBot/src/spamBot.cpp trunk/libirc/examples/stupidServer/src/stupidServer.cpp trunk/libirc/include/IRCClient.h trunk/libirc/include/IRCServer.h trunk/libirc/include/TCPConnection.h trunk/libirc/src/IRCClient.cpp trunk/libirc/src/IRCServer.cpp trunk/libirc/src/ircBasicCommands.cpp trunk/libirc/src/ircBasicCommands.h Modified: trunk/libirc/examples/simpleIRCConnect/src/simpleIRCConnect.cpp =================================================================== --- trunk/libirc/examples/simpleIRCConnect/src/simpleIRCConnect.cpp 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/examples/simpleIRCConnect/src/simpleIRCConnect.cpp 2007-11-16 06:58:55 UTC (rev 333) @@ -32,7 +32,7 @@ { name = "ALL"; } - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { std::string line = info.raw; FILE *fp = fopen("botlog.log","at"); Modified: trunk/libirc/examples/simpleTCPConnect/readme.txt =================================================================== --- trunk/libirc/examples/simpleTCPConnect/readme.txt 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/examples/simpleTCPConnect/readme.txt 2007-11-16 06:58:55 UTC (rev 333) @@ -1,5 +1,5 @@ SimpleTCPConnect -Simple example of using the low level TCP/IP connection class to connect to an IRC server, send a login, join a channel, and receve data. +Simple example of using the low level TCP/IP connection class to connect to an IRC server, send a login, join a channel, and receive data. Not the best way to do it, the full libIRC handles it better, but this is a good test of the TCP/IP classes. \ No newline at end of file Modified: trunk/libirc/examples/spamBot/src/spamBot.cpp =================================================================== --- trunk/libirc/examples/spamBot/src/spamBot.cpp 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/examples/spamBot/src/spamBot.cpp 2007-11-16 06:58:55 UTC (rev 333) @@ -93,7 +93,7 @@ { public: BotNumericsHandler(); - virtual bool receve ( IRCClient &client, std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, std::string &command, BaseIRCCommandInfo &info ); }; typedef struct Modified: trunk/libirc/examples/stupidServer/src/stupidServer.cpp =================================================================== --- trunk/libirc/examples/stupidServer/src/stupidServer.cpp 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/examples/stupidServer/src/stupidServer.cpp 2007-11-16 06:58:55 UTC (rev 333) @@ -40,7 +40,7 @@ { name = "ALL"; } - virtual bool receve ( IRCServer *server, IRCServerConnectedClient *client, const std::string &command, const BaseIRCCommandInfo &info ); + virtual bool receive ( IRCServer *server, IRCServerConnectedClient *client, const std::string &command, const BaseIRCCommandInfo &info ); }; MyCommandHandler allHandler; @@ -98,7 +98,7 @@ } -bool MyCommandHandler::receve ( IRCServer *server, IRCServerConnectedClient *client, const std::string &command, const BaseIRCCommandInfo &info ) +bool MyCommandHandler::receive ( IRCServer *server, IRCServerConnectedClient *client, const std::string &command, const BaseIRCCommandInfo &info ) { if ( info.raw.size() ) { Modified: trunk/libirc/include/IRCClient.h =================================================================== --- trunk/libirc/include/IRCClient.h 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/include/IRCClient.h 2007-11-16 06:58:55 UTC (rev 333) @@ -68,11 +68,11 @@ // called when the system wishes to know the name of this command virtual std::string getCommandName ( void ){return name;} - // the send and receve methods return true if the default handler is to be called + // the send and receive methods return true if the default handler is to be called // it is recomended that the default ALWAYS be called, as it often sets internal data for other mesages - // called when the client receves a command of this type - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ){return true;} + // called when the client receives a command of this type + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ){return true;} // called when the user wishes to send a command of this type virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ){return true;} @@ -183,9 +183,9 @@ virtual bool sendIRCCommand ( teIRCCommands command, IRCCommandInfo &info ); virtual bool sendCTMPCommand ( teCTCPCommands command, CTCPCommandINfo &info ); - virtual bool receveCommand ( const std::string &commandName, BaseIRCCommandInfo &info ); - virtual bool receveIRCCommand ( teIRCCommands command, IRCCommandInfo &info ); - virtual bool receveCTMPCommand ( teCTCPCommands command, CTCPCommandINfo &info ); + virtual bool receiveCommand ( const std::string &commandName, BaseIRCCommandInfo &info ); + virtual bool receiveIRCCommand ( teIRCCommands command, IRCCommandInfo &info ); + virtual bool receiveCTMPCommand ( teCTCPCommands command, CTCPCommandINfo &info ); // -------------------------------------------------------------------------------------- // generaly not called by the client app @@ -274,7 +274,7 @@ virtual teIRCConnectionState getConnectionState ( void ){return ircConnectionState;} virtual void setConnectionState ( teIRCConnectionState state ){ircConnectionState = state;} - // receved data processing + // received data processing void processIRCLine ( std::string line ); void addDataToLine ( std::string &line, unsigned int len, const char *data ); Modified: trunk/libirc/include/IRCServer.h =================================================================== --- trunk/libirc/include/IRCServer.h 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/include/IRCServer.h 2007-11-16 06:58:55 UTC (rev 333) @@ -113,11 +113,11 @@ // called when the system wishes to know the name of this command virtual std::string getCommandName ( void ){return name;} - // the send and receve methods return true if the default handler is to be called + // the send and receive methods return true if the default handler is to be called // it is recomended that the default ALWAYS be called, as it often sets internal data for other mesages - // called when the client receves a command of this type - virtual bool receve ( IRCServer *server, IRCServerConnectedClient *client, const std::string &command, const BaseIRCCommandInfo &info ){return true;} + // called when the client receives a command of this type + virtual bool receive ( IRCServer *server, IRCServerConnectedClient *client, const std::string &command, const BaseIRCCommandInfo &info ){return true;} // called when the user wishes to send a command of this type virtual bool send ( IRCServer *server, IRCServerConnectedClient *client, const std::string &command, const BaseIRCCommandInfo &info ){return true;} @@ -172,7 +172,7 @@ IRCServerChannel *getChannel ( const std::string& name ); // commands - virtual bool receveCommand ( const std::string &commandName, IRCServerConnectedClient *client, const BaseIRCCommandInfo &info ); + virtual bool receiveCommand ( const std::string &commandName, IRCServerConnectedClient *client, const BaseIRCCommandInfo &info ); //command handler methods... for lower level API virtual bool registerCommandHandler ( IRCServerCommandHandler *handler ); Modified: trunk/libirc/include/TCPConnection.h =================================================================== --- trunk/libirc/include/TCPConnection.h 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/include/TCPConnection.h 2007-11-16 06:58:55 UTC (rev 333) @@ -113,7 +113,7 @@ unsigned int getReadChunkSize ( void ); // data pending listeners - // let the people register a callback class to be called when data is receved + // let the people register a callback class to be called when data is received void addListener ( TCPClientDataPendingListener* listener ); void removeListener ( TCPClientDataPendingListener* listener ); @@ -232,7 +232,7 @@ teTCPError setError ( teTCPError error ); // data pending listeners - // let the people register a callback class to be called when data is receved + // let the people register a callback class to be called when data is received void addListener ( TCPServerDataPendingListener* listener ); void removeListener ( TCPServerDataPendingListener* listener ); Modified: trunk/libirc/src/IRCClient.cpp =================================================================== --- trunk/libirc/src/IRCClient.cpp 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/src/IRCClient.cpp 2007-11-16 06:58:55 UTC (rev 333) @@ -261,13 +261,13 @@ commandInfo.source = getServerHost(); // call the "ALL" handler special if there is one - receveCommand(std::string("ALL"),commandInfo); + receiveCommand(std::string("ALL"),commandInfo); if (atoi(commandInfo.command.c_str()) != 0) - receveCommand(std::string("NUMERIC"),commandInfo); + receiveCommand(std::string("NUMERIC"),commandInfo); // notify any handlers for this specific command - receveCommand(commandInfo.command,commandInfo); + receiveCommand(commandInfo.command,commandInfo); } bool IRCClient::sendIRCCommandToServer ( teIRCCommands command, std::string &data) @@ -418,7 +418,7 @@ return sendCommand(info.command,info); } -bool IRCClient::receveCommand ( const std::string &commandName, BaseIRCCommandInfo &info ) +bool IRCClient::receiveCommand ( const std::string &commandName, BaseIRCCommandInfo &info ) { tmUserCommandHandlersMap::iterator commandListItr = userCommandHandlers.find(commandName); @@ -433,7 +433,7 @@ std::vector<IRCClientCommandHandler*>::iterator itr = commandListItr->second.begin(); while (itr != commandListItr->second.end()) { - if ( (*itr)->receve(*this,commandName,info)) + if ( (*itr)->receive(*this,commandName,info)) callDefault = true; itr++; } @@ -446,25 +446,25 @@ tmCommandHandlerMap::iterator itr = defaultCommandHandlers.find(commandName); if (itr != defaultCommandHandlers.end()) { - itr->second->receve(*this,commandName,info); + itr->second->receive(*this,commandName,info); return true; } } return false; } -bool IRCClient::receveIRCCommand ( teIRCCommands command, IRCCommandInfo &info ) +bool IRCClient::receiveIRCCommand ( teIRCCommands command, IRCCommandInfo &info ) { info.type = eIRCCommand; info.ircCommand = command; - return receveCommand(info.command,info); + return receiveCommand(info.command,info); } -bool IRCClient::receveCTMPCommand ( teCTCPCommands command, CTCPCommandINfo &info ) +bool IRCClient::receiveCTMPCommand ( teCTCPCommands command, CTCPCommandINfo &info ) { info.type = eCTCPCommand; info.ctcpCommand = command; - return receveCommand(info.command,info); + return receiveCommand(info.command,info); } bool IRCClient::registerCommandHandler ( IRCClientCommandHandler *handler ) Modified: trunk/libirc/src/IRCServer.cpp =================================================================== --- trunk/libirc/src/IRCServer.cpp 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/src/IRCServer.cpp 2007-11-16 06:58:55 UTC (rev 333) @@ -447,16 +447,16 @@ void IRCServer::clientIRCCommand ( const BaseIRCCommandInfo &command, IRCServerConnectedClient *client ) { - receveCommand(std::string("ALL"),client,command); + receiveCommand(std::string("ALL"),client,command); if (atoi(command.command.c_str()) != 0) - receveCommand( std::string("NUMERIC"),client,command); + receiveCommand( std::string("NUMERIC"),client,command); // notify any handlers for this specific command - receveCommand(command.command,client,command); + receiveCommand(command.command,client,command); } -bool IRCServer::receveCommand ( const std::string &commandName, IRCServerConnectedClient *client, const BaseIRCCommandInfo &info ) +bool IRCServer::receiveCommand ( const std::string &commandName, IRCServerConnectedClient *client, const BaseIRCCommandInfo &info ) { tmCommandHandlerListMap::iterator itr = userCommandHandlers.find(commandName); if ( itr != userCommandHandlers.end() ) @@ -464,7 +464,7 @@ bool callDefault = false; for ( unsigned int i = 0; i < (unsigned int) itr->second.size(); i++ ) { - if ( itr->second[i]->receve(this,client,commandName,info)) + if ( itr->second[i]->receive(this,client,commandName,info)) callDefault = true; } if (!callDefault) @@ -473,7 +473,7 @@ tmCommandHandlerMap::iterator defaultIter = defaultCommandHandlers.find(commandName); if ( defaultIter != defaultCommandHandlers.end() && defaultIter->second ) - return defaultIter->second->receve(this,client,commandName,info); + return defaultIter->second->receive(this,client,commandName,info); return false; } Modified: trunk/libirc/src/ircBasicCommands.cpp =================================================================== --- trunk/libirc/src/ircBasicCommands.cpp 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/src/ircBasicCommands.cpp 2007-11-16 06:58:55 UTC (rev 333) @@ -25,7 +25,7 @@ name = "NICK"; } -bool IRCClientNickCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientNickCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { client.nickCommand(info); return true; @@ -51,7 +51,7 @@ name = "USER"; } -bool IRCClientUserCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientUserCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { return true; } @@ -75,7 +75,7 @@ name = "PING"; } -bool IRCClientPingCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientPingCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { IRCCommandInfo ircInfo; ircInfo.command = eCMD_PONG; @@ -99,7 +99,7 @@ name = "PONG"; } -bool IRCClientPongCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientPongCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { // we do nothing on a pong return true; @@ -121,7 +121,7 @@ name = "NOTICE"; } -bool IRCClientNoticeCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientNoticeCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { trClientMessageEventInfo messageInfo; @@ -145,7 +145,7 @@ name = "JOIN"; } -bool IRCClientJoinCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientJoinCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { client.joinMessage(info); return true; @@ -182,7 +182,7 @@ name = "PART"; } -bool IRCClientPartCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientPartCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { client.partMessage(info); return true; @@ -206,7 +206,7 @@ name = "QUIT"; } -bool IRCClientQuitCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientQuitCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { client.QuitMessage(info); return true; @@ -230,7 +230,7 @@ name = "MODE"; } -bool IRCClientModeCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientModeCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { // we got a mode message, see what the deal is client.modeCommand(info); @@ -259,7 +259,7 @@ name = "PRIVMSG"; } -bool IRCClientPrivMsgCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientPrivMsgCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { client.privMessage(info); return true; @@ -284,7 +284,7 @@ name = "KICK"; } -bool IRCClientKickCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientKickCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { client.kickCommand(info); return true; @@ -311,7 +311,7 @@ name = "ALL"; } -bool IRCClientALLCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientALLCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { // just log it out client.log(string_util::format("ALL::command %s from %s for %s containing %s",info.command.c_str(),info.source.c_str(),info.target.c_str(),info.getAsString().c_str()),4); @@ -334,7 +334,7 @@ name = "NUMERIC"; } -bool IRCClientNumericCommand::receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) +bool IRCClientNumericCommand::receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ) { int numeric = atoi(info.command.c_str()); Modified: trunk/libirc/src/ircBasicCommands.h =================================================================== --- trunk/libirc/src/ircBasicCommands.h 2007-11-16 06:58:05 UTC (rev 332) +++ trunk/libirc/src/ircBasicCommands.h 2007-11-16 06:58:55 UTC (rev 333) @@ -23,7 +23,7 @@ { public: IRCClientALLCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -32,7 +32,7 @@ { public: IRCClientNumericCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; // Text based IRC commands @@ -43,7 +43,7 @@ { public: IRCClientNickCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -53,7 +53,7 @@ { public: IRCClientUserCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -63,7 +63,7 @@ { public: IRCClientPingCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -73,7 +73,7 @@ { public: IRCClientPongCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -83,7 +83,7 @@ { public: IRCClientNoticeCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -93,7 +93,7 @@ { public: IRCClientJoinCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -103,7 +103,7 @@ { public: IRCClientPartCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -113,7 +113,7 @@ { public: IRCClientQuitCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -123,7 +123,7 @@ { public: IRCClientModeCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -133,7 +133,7 @@ { public: IRCClientPrivMsgCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; @@ -143,7 +143,7 @@ { public: IRCClientKickCommand(); - virtual bool receve ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); + virtual bool receive ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); virtual bool send ( IRCClient &client, const std::string &command, BaseIRCCommandInfo &info ); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |