mirror of
https://github.com/correl/mercenary.git
synced 2024-11-27 11:09:52 +00:00
Correl Roush
34b445fe87
git-svn-id: file:///srv/svn/ircclient/trunk@6 a9804ffe-773b-11dd-bd7c-89c3ef1d2733
41 lines
946 B
C++
41 lines
946 B
C++
#ifndef MIRC_H
|
|
#define MIRC_H
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QStringList>
|
|
#include <QMap>
|
|
#include <QVector>
|
|
#include <QTextStream>
|
|
#include "script.h"
|
|
#include "parser.h"
|
|
|
|
class MIRCScript;
|
|
|
|
class MIRCScriptManager : public QObject {
|
|
Q_OBJECT
|
|
private:
|
|
QObject *parent;
|
|
QVector<MIRCScript> scripts;
|
|
QMap<QString, QString> _variables;
|
|
QMap<QString,void (*)(QStringList)> internal_aliases;
|
|
QMap<QString, mirc_alias> aliases;
|
|
QTextStream *output;
|
|
public:
|
|
MIRCScriptManager(QObject *parent = 0);
|
|
/*
|
|
bool load(QString filename);
|
|
bool unload(QString filename);
|
|
*/
|
|
void call_alias(QString alias, QStringList arguments);
|
|
bool register_alias(QString alias, void (*fn)(QStringList));
|
|
|
|
bool hasVariable(QString variable);
|
|
QString variable(QString variable);
|
|
void variable(QString variable, QString value);
|
|
QMap<QString, QString> variables();
|
|
signals:
|
|
void unknown_alias(QString alias, QStringList arguments);
|
|
};
|
|
|
|
#endif
|