aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--CMakeLists.txt5
-rw-r--r--HelpMe.md6
-rw-r--r--irc/CMakeLists.txt37
-rw-r--r--irc/Readme.md25
-rw-r--r--irc/botircdiceparser.cpp350
-rw-r--r--irc/botircdiceparser.h72
-rw-r--r--irc/build/ui_mainwindow.h110
-rw-r--r--irc/main.cpp156
-rw-r--r--irc/mainwindow.ui75
m---------webserver/qhttp0
11 files changed, 1 insertions, 838 deletions
diff --git a/.gitmodules b/.gitmodules
index 1220506..e69de29 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +0,0 @@
-[submodule "webserver/qhttp"]
- path = webserver/qhttp
- url = https://github.com/azadkuh/qhttp.git
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61b1ce8..e4d0536 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,6 @@ enable_testing(true)
include_directories(${CMAKE_CURRENT_SOURCE_DIR} result node)
option(BUILD_CLI OFF)
-option(BUILD_IRC OFF)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -104,10 +103,6 @@ IF(BUILD_CLI)
add_subdirectory(cli)
ENDIF()
-IF(BUILD_IRC)
- add_subdirectory(irc)
-ENDIF()
-
if(TESTS)
add_subdirectory( tests )
endif()
diff --git a/HelpMe.md b/HelpMe.md
index 66bfc27..b11b940 100644
--- a/HelpMe.md
+++ b/HelpMe.md
@@ -54,7 +54,7 @@
## DiceParser: What is it ?
DiceParser is a software component dedicated to roll dice through simple commands. This software component is available on different platform.
-Such as: Irc bot, discord bot, included in Rolisteam, web server, on twitter etc.
+Such as: discord bot, included in Rolisteam, on twitter etc.
## About examples in this documentation
@@ -1275,8 +1275,6 @@ The k operator to keeps as many dice as you roll is pretty useless because it is
| Rolisteam |```!```| [Documentation](http://wiki.rolisteam.org/index.php/En:Dice) |
| Discord |```!```| To install DiceParser on your server [http://www.rolisteam.org/discord.html](http://www.rolisteam.org/discord.html) |
| Twitter | ```#roll``` | Twit any message starting with #roll following by dice command (e.g: ```#roll 2d6```) |
-| IrcBot |```!```| |
-| webserver | nothing | No public published yet. Has dedicated text field |
| dice | nothing | dice is a command line application to roll dice: ```dice "2d6"``` |
@@ -1287,8 +1285,6 @@ The k operator to keeps as many dice as you roll is pretty useless because it is
| Rolisteam | no support for comments yet. Rolisteam is a big software. You may not have all the most recent feature from diceparser. |
| Discord | If the command takes too much time. It is canceled |
| Twitter | Result should be short. No aliases |
-| IrcBot | No aliases |
-| webserver| No aliases |
| dice | |
# Discord Bot
diff --git a/irc/CMakeLists.txt b/irc/CMakeLists.txt
deleted file mode 100644
index 27f8f6e..0000000
--- a/irc/CMakeLists.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-cmake_minimum_required(VERSION 3.16)
-
-
-project(irc)
-# Find includes in corresponding build directories
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# Instruct CMake to run moc automatically when needed.
-set(CMAKE_AUTOMOC ON)
-SET(CMAKE_AUTOUIC ON)
-set(EXECUTABLE_OUTPUT_PATH bin/)
-
-# Find the QtWidgets library
-set(QT_REQUIRED_VERSION "6.3.0")
-
-set(irc_SOURCES botircdiceparser.cpp main.cpp)
-set(irc_HEADERS botircdiceparser.h)
-
-
-
-find_package(Qt6 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets Gui Svg LinguistTools Network)
-
-
-set(MODE "cli")
-
-ADD_DEFINITIONS(
- -std=c++11
-)
-
-add_executable(dirc ${irc_SOURCES} ${irc_HEADERS} ${irc_FORMS})
-set(diceparser_shared_INCLUDE_DIRS "../diceparser")
-target_include_directories(dirc PRIVATE ../include ../ ../result ../node)
-link_directories(BEFORE ${CMAKE_BINARY_DIR})
-
-
-
-target_link_libraries(dirc PUBLIC Qt6::Core Qt6::Gui Qt6::Svg Qt6::Widgets Qt6::Network PRIVATE diceparser_shared)
-INSTALL_TARGETS(/bin dirc)
diff --git a/irc/Readme.md b/irc/Readme.md
deleted file mode 100644
index 4e9f8f8..0000000
--- a/irc/Readme.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# Change IRC Connection info
-
-In order to make the bot connect to your irc server/channel you must edit the main.cpp file at line: 41.
-
-
-# Compile
-
-```
-cd source/diceparser
-mkdir build
-cd build
-
-cmake .. -DBUILD_IRC=ON
-make -j8
-```
-
-
-
-# Run it
-
-after 30second the bot must appears in the list of member of the channel.
-
-
-# The IRC protocol
-IRC is managed by hand and its support is very limited.
diff --git a/irc/botircdiceparser.cpp b/irc/botircdiceparser.cpp
deleted file mode 100644
index 42ec4cc..0000000
--- a/irc/botircdiceparser.cpp
+++ /dev/null
@@ -1,350 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2014 by Renaud Guezennec *
- * http://www.rolisteam.org/contact *
- * *
- * This file is part of DiceParser *
- * *
- * DiceParser 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., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-#include "botircdiceparser.h"
-
-#include <QDebug>
-#include <QString>
-#include <math.h>
-#include <QJsonArray>
-#include <QJsonDocument>
-#include <QJsonObject>
-
-QString colorToIrcCode(QString str)
-{
- if(str == QStringLiteral("reset"))
- {
- return {};
- }
- return str;
-}
-
-BotIrcDiceParser::BotIrcDiceParser(QObject* parent) : QObject(parent)
-{
- // Create socket
- m_socket= new QTcpSocket(this);
-
- m_parser= new DiceParser();
-
- // Connect signals and slots!
- connect(m_socket, SIGNAL(readyRead()), this, SLOT(readData()));
- //connect(m_socket, SIGNAL(connected()), this, SLOT(authentificationProcess()));
- connect(m_socket, SIGNAL(disconnected()), this, SLOT(connectToServer()));
- connect(
- m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(errorOccurs(QAbstractSocket::SocketError)));
-}
-
-BotIrcDiceParser::~BotIrcDiceParser()
-{
- // delete ui;
-}
-void BotIrcDiceParser::connectToServer()
-{
- qDebug() << "start connection";
- m_socket->connectToHost(m_info.m_host, m_info.m_port);
-}
-
-void BotIrcDiceParser::setInfo(const ConnectionInfo &info)
-{
- if(info.m_host == m_info.m_host && info.m_channel == m_info.m_channel)
- return;
- m_info = info;
- emit infoChanged();
-}
-void BotIrcDiceParser::errorOccurs(QAbstractSocket::SocketError)
-{
- qDebug() << "ERROR" << m_socket->errorString();
-}
-
-void BotIrcDiceParser::readData()
-{
- QString readLine= m_socket->readLine();
-
- if(readLine.startsWith("!"))
- readLine= readLine.remove(0, 1);
-
- if(readLine.contains("!"))
- {
- // qDebug()<< "in /dice";
- QString dice= ".*PRIVMSG.*!(.*)";
- QRegExp exp(dice);
- exp.indexIn(readLine);
-
- QStringList list= exp.capturedTexts();
- qDebug() << list;
- if(list.size() == 2)
- {
- QString cmd= list[1];
- if(!cmd.isEmpty())
- {
- cmd= cmd.simplified();
- QString result= startDiceParsing(cmd, true);
- if(!result.isEmpty())
- {
- QString msg("PRIVMSG %2 :%1 \r\n");
- m_socket->write(msg.arg(result, m_info.m_channel).toLatin1());
- }
- }
- }
- else
- {
- return;
- }
- //
- }
- else if(readLine.contains("PING :"))
- {
- QString dice= "PING :(.*)";
- QRegExp exp(dice);
- exp.indexIn(readLine);
- QStringList list= exp.capturedTexts();
- if(list.size() == 2)
- {
- QString resp= "PONG :" + list[1];
-
- m_socket->write(resp.toLatin1());
- }
- }
- if(readLine.contains(QLatin1String("Found your hostname")))
- {
- authentificationProcess();
- }
- if(readLine.contains(QLatin1String("msg NickServ identify")))
- {
- setRegisterName();
- }
- // Add to ouput
- // ui->m_output->append(readLine.trimmed());
- QMessageLogger().debug() << readLine.trimmed();
- // Next data??
- if(m_socket->canReadLine())
- readData();
-}
-void BotIrcDiceParser::setRegisterName()
-{
- qDebug() << "IRC BOT register name";
- m_socket->write(QLatin1String("msg NickServ identify \r\n").data());
- joinChannel();
-}
-
-void BotIrcDiceParser::disconnectFromServer()
-{
- qDebug() << "IRC BOT disconnect";
- m_socket->write("QUIT Good bye \r\n"); // Good bye is optional message
- m_socket->flush();
- m_socket->disconnect(); // Now we can try it :-)
-}
-void BotIrcDiceParser::authentificationProcess()
-{
- qDebug() << "IRC BOT authentification";
- auto nick = QStringLiteral("NICK %1 \r\n").arg(m_info.m_nickname);
- auto user = QStringLiteral("USER %1 %1 %1 :%1 BOT \r\n").arg(m_info.m_nickname);
- m_socket->write(nick.toLocal8Bit().data());
- m_socket->write(user.toLocal8Bit().data());
- joinChannel();
-}
-void BotIrcDiceParser::joinChannel()
-{
- qDebug() << "IRC BOT Join channel";
- auto text = QStringLiteral("JOIN %1 \r\n").arg(m_info.m_channel);
- m_socket->write(text.toLocal8Bit().data());
-}
-
-QString displayCommandResult(QString json, bool withColor)
-{
- QString result;
- QTextStream out(&result);
- QJsonDocument doc= QJsonDocument::fromJson(json.toUtf8());
- auto obj= doc.object();
- auto error= obj["error"].toString();
- auto warning= obj["warning"].toString();
- auto comment= obj["comment"].toString();
- auto arrayInst= obj["instructions"].toArray();
- QStringList diceResults;
- for(const auto &inst : qAsConst(arrayInst))
- {
- auto obj= inst.toObject();
- auto diceVals= obj["diceval"].toArray();
- for(const auto & diceval : qAsConst(diceVals))
- {
- auto objval= diceval.toObject();
- auto resultStr= objval["string"].toString();
- diceResults << resultStr;
- }
- }
- auto diceList= diceResults.join(",");
- auto scalarText= obj["scalar"].toString();
- auto cmd= obj["command"].toString();
- auto resultStr= obj["string"].toString();
-
- if(!error.isEmpty())
- {
- out << "Error" << error << "\n";
- out.flush();
- return result;
- }
-
- if(!warning.isEmpty())
- out << "Warning: " << warning << "\n";
-
- QString str;
-
- if(withColor)
- str= QString("Result: %1 - details:[%3 (%2)]").arg(scalarText, diceList, cmd);
- else
- str= QString("Result: %1 - details:[%3 (%2)]").arg(scalarText, diceList, cmd);
-
- if(!resultStr.isEmpty() && resultStr != scalarText)
- {
- resultStr.replace("%2", diceList.trimmed());
- str= resultStr;
- }
-
- if(!comment.isEmpty())
- {
- out << comment << " ";
- }
- out << str << "\n";
-
- out.flush();
- return result;
-}
-
-
-
-/*QString BotIrcDiceParser::diceToText(QList<ExportedDiceResult>& diceList, bool highlight, bool homogeneous)
-{
- QStringList global;
- for(auto dice : diceList)
- {
- QStringList resultGlobal;
- for(int face : dice.keys())
- {
- QStringList result;
- ListDiceResult diceResult= dice.value(face);
- // patternColor = patternColorarg();
- for(HighLightDice tmp: qAsConst(diceResult))
- {
- QStringList diceListStr;
- QStringList diceListChildren;
-
- for(int i= 0; i < tmp.getResult().size(); ++i)
- {
- qint64 dievalue= tmp.getResult()[i];
- QString prefix("%1");
-
- if((tmp.isHighlighted()) && (highlight))
- {
- if(tmp.getColor().isEmpty() || tmp.getColor() == "black")
- {
- prefix= "%1";
- }
- if(tmp.getColor() == "white")
- {
- prefix= "%1";
- }
- if(tmp.getColor() == "blue")
- {
- prefix= "%1";
- }
- if(tmp.getColor() == "red")
- {
- prefix= "%1";
- }
- }
-
- if(i == 0)
- {
- diceListStr << prefix.arg(QString::number(dievalue));
- }
- else
- {
- diceListChildren << prefix.arg(QString::number(dievalue));
- }
- }
- if(!diceListChildren.isEmpty())
- {
- diceListStr << QString("[%1]").arg(diceListChildren.join(' '));
- }
-
- result << diceListStr.join(' ');
- // qDebug() << result << tmp.first << tmp.second;
- }
-
- if(dice.keys().size() > 1)
- {
- resultGlobal << QString(" d%2:(%1)").arg(result.join(',')).arg(face);
- }
- else
- {
- resultGlobal << result;
- }
- }
- global << resultGlobal.join(' ');
- }
- return global.join(' ');
-}*/
-
-QString BotIrcDiceParser::startDiceParsing(QString& cmd, bool highlight)
-{
- QString result;
- QTextStream out(&result);
- if(m_parser->parseLine(cmd))
- {
- m_parser->start();
-
- if(!m_parser->humanReadableError().isEmpty())
- {
- out << "Error" << m_parser->humanReadableError() << "\n";
- return QString();
- }
- auto allSameColor= true;
- QString colorP;
- auto json= m_parser->resultAsJSon(
- [&colorP, &allSameColor](const QString& result, const QString& color, bool hightlight) {
- auto trueColor= color;
- if(color.isEmpty())
- trueColor= "red";
-
- if(colorP.isEmpty())
- colorP= trueColor;
- else if(colorP != trueColor)
- allSameColor= false;
-
- auto front= colorToIrcCode(trueColor);
- auto end= front.isEmpty() ? "" : colorToIrcCode("reset");
- return hightlight ? QString("%1%2%3").arg(front).arg(result).arg(end) : result;
- });
-
- out << displayCommandResult(json, allSameColor);
- }
- else
- {
- out << m_parser->humanReadableError() << "\n";
- }
-
- return result;
-}
-
-ConnectionInfo BotIrcDiceParser::info() const
-{
- return m_info;
-}
diff --git a/irc/botircdiceparser.h b/irc/botircdiceparser.h
deleted file mode 100644
index 4509646..0000000
--- a/irc/botircdiceparser.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2014 by Renaud Guezennec *
- * http://www.rolisteam.org/contact *
- * *
- * This file is part of DiceParser *
- * *
- * DiceParser 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., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include "diceparser.h"
-
-#include <QTcpSocket>
-
-struct ConnectionInfo {
- QString m_host;
- QString m_channel;
- QString m_nickname;
- int m_port;
-};
-
-class BotIrcDiceParser : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(ConnectionInfo info READ info WRITE setInfo NOTIFY infoChanged)
-
-public:
- explicit BotIrcDiceParser(QObject* parent= 0);
- virtual ~BotIrcDiceParser();
-
- QString diceToText(QList<ExportedDiceResult>& dice, bool highlight, bool homogeneous);
- QString startDiceParsing(QString& cmd, bool highlight);
- ConnectionInfo info() const;
-
-public slots:
- void errorOccurs(QAbstractSocket::SocketError);
- void connectToServer();
- void setInfo(const ConnectionInfo & info);
-
-
-private slots:
- void readData();
- void disconnectFromServer();
- void authentificationProcess();
- void joinChannel();
- void setRegisterName();
-
-
-signals:
- void infoChanged();
-
-private:
- QTcpSocket* m_socket;
- DiceParser* m_parser;
- ConnectionInfo m_info;
-};
-
-#endif // MAINWINDOW_H
diff --git a/irc/build/ui_mainwindow.h b/irc/build/ui_mainwindow.h
deleted file mode 100644
index ecca604..0000000
--- a/irc/build/ui_mainwindow.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/********************************************************************************
-** Form generated from reading UI file 'mainwindow.ui'
-**
-** Created by: Qt User Interface Compiler version 5.5.1
-**
-** WARNING! All changes made in this file will be lost when recompiling UI file!
-********************************************************************************/
-
-#ifndef UI_MAINWINDOW_H
-#define UI_MAINWINDOW_H
-
-#include <QtCore/QVariant>
-#include <QtWidgets/QAction>
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QButtonGroup>
-#include <QtWidgets/QHBoxLayout>
-#include <QtWidgets/QHeaderView>
-#include <QtWidgets/QMenuBar>
-#include <QtWidgets/QPushButton>
-#include <QtWidgets/QSpacerItem>
-#include <QtWidgets/QStatusBar>
-#include <QtWidgets/QTextEdit>
-#include <QtWidgets/QVBoxLayout>
-#include <QtWidgets/QWidget>
-#include <qbotircdiceparser.h>
-
-QT_BEGIN_NAMESPACE
-
-class Ui_BotIrcDiceParser
-{
-public:
- QWidget* centralwidget;
- QVBoxLayout* verticalLayout;
- QHBoxLayout* horizontalLayout;
- QPushButton* m_connectButton;
- QPushButton* m_joinButton;
- QSpacerItem* horizontalSpacer;
- QPushButton* m_disconnectButton;
- QTextEdit* m_output;
- QMenuBar* menubar;
- QStatusBar* statusbar;
-
- void setupUi(QBotIrcDiceParser* BotIrcDiceParser)
- {
- if(BotIrcDiceParser->objectName().isEmpty())
- BotIrcDiceParser->setObjectName(QStringLiteral("BotIrcDiceParser"));
- BotIrcDiceParser->resize(604, 458);
- centralwidget= new QWidget(BotIrcDiceParser);
- centralwidget->setObjectName(QStringLiteral("centralwidget"));
- verticalLayout= new QVBoxLayout(centralwidget);
- verticalLayout->setObjectName(QStringLiteral("verticalLayout"));
- verticalLayout->setContentsMargins(0, 0, 0, 0);
- horizontalLayout= new QHBoxLayout();
- horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
- m_connectButton= new QPushButton(centralwidget);
- m_connectButton->setObjectName(QStringLiteral("m_connectButton"));
-
- horizontalLayout->addWidget(m_connectButton);
-
- m_joinButton= new QPushButton(centralwidget);
- m_joinButton->setObjectName(QStringLiteral("m_joinButton"));
-
- horizontalLayout->addWidget(m_joinButton);
-
- horizontalSpacer= new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
-
- horizontalLayout->addItem(horizontalSpacer);
-
- m_disconnectButton= new QPushButton(centralwidget);
- m_disconnectButton->setObjectName(QStringLiteral("m_disconnectButton"));
-
- horizontalLayout->addWidget(m_disconnectButton);
-
- verticalLayout->addLayout(horizontalLayout);
-
- m_output= new QTextEdit(centralwidget);
- m_output->setObjectName(QStringLiteral("m_output"));
-
- verticalLayout->addWidget(m_output);
-
- menubar= new QMenuBar(BotIrcDiceParser);
- menubar->setObjectName(QStringLiteral("menubar"));
- menubar->setGeometry(QRect(0, 0, 604, 25));
- statusbar= new QStatusBar(BotIrcDiceParser);
- statusbar->setObjectName(QStringLiteral("statusbar"));
-
- retranslateUi(BotIrcDiceParser);
-
- QMetaObject::connectSlotsByName(BotIrcDiceParser);
- } // setupUi
-
- void retranslateUi(QBotIrcDiceParser* BotIrcDiceParser)
- {
- BotIrcDiceParser->setWindowTitle(QApplication::translate("BotIrcDiceParser", "BotIrcDiceParser", 0));
- m_connectButton->setText(QApplication::translate("BotIrcDiceParser", "Connect", 0));
- m_joinButton->setText(QApplication::translate("BotIrcDiceParser", "join", 0));
- m_disconnectButton->setText(QApplication::translate("BotIrcDiceParser", "Disconnect", 0));
- } // retranslateUi
-};
-
-namespace Ui
-{
- class BotIrcDiceParser : public Ui_BotIrcDiceParser
- {
- };
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // UI_MAINWINDOW_H
diff --git a/irc/main.cpp b/irc/main.cpp
deleted file mode 100644
index 8647f14..0000000
--- a/irc/main.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2014 by Renaud Guezennec *
- * http://www.rolisteam.org/contact/ *
- * *
- * This file is part of DiceParser *
- * *
- * DiceParser 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., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#include "botircdiceparser.h"
-#include <QCoreApplication>
-/**
- * @page Dice
- * The cli for DiceParser the new dice system from rolisteam.
- * @section Build and install
- * To build this program, type these command:
- * - mkdir build
- * - cd build
- * - cmake ../
- * - make
- * - make install
- * @return
- */
-int main(int argc, char* argv[])
-{
- QCoreApplication app(argc, argv);
- BotIrcDiceParser bot;
- bot.setInfo({"host", "#channel", "dice", 8001});
- bot.connectToServer();
- return app.exec();
-}
-
-/*QTextStream out(stdout, QIODevice::WriteOnly);
-
-
-
-void usage()
-{
- QString help = "Usage: ./dice [options]\n\
-\n\
-Options:\n\
- -c, --color-off Disable color to highlight result\n\
- -v, --version Show the version and quit.\n\
- --reset-settings Erase the settings and use the default\n\
- parameters\n\
- -d, --dot-file <dotfile> Instead of rolling dice, generate the\n\
- execution tree and write it in <dotfile>\n\
- -t, --translation <translationfile> path to the translation file:\n\
- <translationfile>\n\
- -h, --help Display this help\n\
-";
-
- out << help;
-}
-
-
-int main(int argc, char *argv[])
-{
-
-
-
- QStringList commands;
- QString cmd;
- QString dotFileStr;
-
- bool colorb=true;
-
- QCommandLineParser optionParser;
- QCommandLineOption color(QStringList() << "c"<< "color-off", "Disable color to highlight result");
- QCommandLineOption version(QStringList() << "v"<< "version", "Show the version and quit.");
- QCommandLineOption reset(QStringList() << "reset-settings", "Erase the settings and use the default parameters");
- QCommandLineOption dotFile(QStringList() << "d"<<"dot-file", "Instead of rolling dice, generate the execution tree
-and write it in <dotfile>","dotfile"); QCommandLineOption translation(QStringList() << "t"<<"translation", "path to the
-translation file: <translationfile>","translationfile"); QCommandLineOption help(QStringList() << "h"<<"help", "Display
-this help");
-
- if(!optionParser.addOption(color))
- {
- out << optionParser.errorText() << "\n";
- }
-
- optionParser.addOption(version);
- optionParser.addOption(reset);
- optionParser.addOption(dotFile);
- optionParser.addOption(translation);
- optionParser.addOption(help);
-
- for(int i=0;i<argc;++i)
- {
-
- commands << QString::fromLatin1(argv[i]);
- }
-
- optionParser.process(commands);
-
-
-
-
- if(optionParser.isSet(color))
- {
- commands.removeAt(0);
- colorb = false;
- }
- else if(optionParser.isSet(version))
- {
- out << "Rolisteam DiceParser v1.0.0"<< "\n";
- out << "More Details: www.rolisteam.org"<< "\n";
- return 0;
- }
- else if(optionParser.isSet(reset))
- {
- return 0;
- }
- else if(optionParser.isSet(dotFile))
- {
- dotFileStr = optionParser.value(dotFile);
- }
- else if(optionParser.isSet(translation))
- {
-
- }
- else if(optionParser.isSet(help))
- {
- cmd = "help";
- }
- QStringList cmdList = optionParser.positionalArguments();
- // qDebug()<< "rest"<< cmdList;
-
- if(!cmdList.isEmpty())
- {
- cmd = cmdList.first();
- }
- if(!cmd.isEmpty())
- {
- startDiceParsing(cmd,dotFileStr,colorb);
- if(cmd=="help")
- {
- usage();
- }
- }
-
- return 0;
-}*/
diff --git a/irc/mainwindow.ui b/irc/mainwindow.ui
deleted file mode 100644
index 198a293..0000000
--- a/irc/mainwindow.ui
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>BotIrcDiceParser</class>
- <widget class="QBotIrcDiceParser" name="BotIrcDiceParser">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>604</width>
- <height>458</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>BotIrcDiceParser</string>
- </property>
- <widget class="QWidget" name="centralwidget">
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QPushButton" name="m_connectButton">
- <property name="text">
- <string>Connect</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="m_joinButton">
- <property name="text">
- <string>join</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="m_disconnectButton">
- <property name="text">
- <string>Disconnect</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QTextEdit" name="m_output"/>
- </item>
- </layout>
- </widget>
- <widget class="QMenuBar" name="menubar">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>604</width>
- <height>25</height>
- </rect>
- </property>
- </widget>
- <widget class="QStatusBar" name="statusbar"/>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/webserver/qhttp b/webserver/qhttp
deleted file mode 160000
-Subproject 2cc654a126b80cd081d2985d5e08437e9eafd87