From 74377ece178e661194a40fa79238b3089bb0d0f2 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Mon, 28 Feb 2011 18:48:58 +0100 Subject: Cleaned up unneeded files, some bugfixes ismaster/isuser now gets called with origin_raw --- parseline.cpp | 89 ----------------------------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 parseline.cpp (limited to 'parseline.cpp') diff --git a/parseline.cpp b/parseline.cpp deleted file mode 100644 index f993325..0000000 --- a/parseline.cpp +++ /dev/null @@ -1,89 +0,0 @@ -// parseline.cpp -// -// Copyright 2010 Unknown -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -// MA 02110-1301, USA. - - -#include -#include -#include "mytypes.h" - - -ircmessage parseline (string line) -{ - ircmessage temp; - int foundpos; - int pos; - - pos=0; - if (line.substr(0,1)==":") - { - foundpos=line.find (' ',0); - temp.origin=line.substr(1,foundpos-1); - pos=foundpos+1; - } - - foundpos=line.find(' ',pos); - if (foundpos==string::npos) - { - temp.command=line; - } - else - { - temp.command=line.substr(pos,foundpos-pos); - pos=foundpos+1; - if (line.substr(pos,1)==":") - { - temp.content=line.substr(pos+1); - } - else - { - foundpos=line.find(" :",pos); - if (foundpos!=string::npos) - { - temp.params=line.substr(pos,foundpos-pos); - temp.content=line.substr(foundpos+2); - } - else - { - temp.params=line.substr(pos); - } - } - } - //temp.origin=cut_nick(temp.origin); - - - return temp; -} - - -int main(int argc, char** argv) -{ - char foo[1000]; - string l; - ircmessage m; - cin.getline(foo, sizeof(foo)); - l=foo; -// cout << l; - m=parseline(l); - cout << "origin: " << m.origin << endl; - cout << "command: " << m.command << endl; - cout << "content: " << m.content << endl; - cout << "params: " << m.params << endl; - - return 0; -} -- cgit v1.2.1