|
@@ -35,17 +35,13 @@ Client::Client(App *app, ActiveClient* ac, bool supportsSendPrivate):
|
|
|
myOnServerFlag(false),
|
|
|
mySpamMutedFlag(false),
|
|
|
myQWMutedFlag(false),
|
|
|
- myJoinMessageTimer(new QTimer()),
|
|
|
myKeepNickTimer(new QTimer()),
|
|
|
myFloodTimer(new QTimer()),
|
|
|
myQWBroadcastFloodTimer(new QTimer()),
|
|
|
mySpamBroadcastFloodTimer(new QTimer()),
|
|
|
- myJoinMessagePrinted(false),
|
|
|
- myJoinMessageScheduled(false),
|
|
|
mySupportsSendPrivate(supportsSendPrivate),
|
|
|
myMaxClients(0)
|
|
|
{
|
|
|
- myJoinMessageTimer->setSingleShot(true);
|
|
|
myKeepNickTimer->setSingleShot(true);
|
|
|
myFloodTimer->setSingleShot(true);
|
|
|
myQWBroadcastFloodTimer->setSingleShot(true);
|
|
@@ -55,7 +51,6 @@ Client::Client(App *app, ActiveClient* ac, bool supportsSendPrivate):
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
Client::~Client()
|
|
|
{
|
|
|
- delete myJoinMessageTimer;
|
|
|
delete myKeepNickTimer;
|
|
|
delete myFloodTimer;
|
|
|
delete myQWBroadcastFloodTimer;
|
|
@@ -65,7 +60,6 @@ Client::~Client()
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
void Client::connect(const char *host, quint16 port)
|
|
|
{
|
|
|
- myJoinMessageScheduled = true; //Hi message only scheduled at bot connection
|
|
|
setPing(13);
|
|
|
QWClient::connect(host, port);
|
|
|
}
|
|
@@ -425,13 +419,13 @@ void Client::onDownloadStarted(const char *fileName)
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
void Client::run()
|
|
|
{
|
|
|
- if(!myJoinMessageTimer->isActive() && !myJoinMessagePrinted)
|
|
|
- {
|
|
|
- say("Hi, I am QWNET's bot, type .help to see my commands.");
|
|
|
- myJoinMessagePrinted = true;
|
|
|
- }
|
|
|
+ // if(!myJoinMessageTimer->isActive() && !myJoinMessagePrinted)
|
|
|
+ // {
|
|
|
+ // say("Hi, I am QWNET's bot, type .help to see my commands.");
|
|
|
+ // myJoinMessagePrinted = true;
|
|
|
+ // }
|
|
|
|
|
|
- /* Keep nick... Simply set name again after 10 secs */
|
|
|
+ /* Keep nick... Simply set name again after 30 secs */
|
|
|
if(!myKeepNickTimer->isActive())
|
|
|
{
|
|
|
setName(Settings::globalInstance()->botName().toAscii().data());
|
|
@@ -456,14 +450,6 @@ void Client::onStuffedCmd(const char *cmd)
|
|
|
myOnServerFlag = true;
|
|
|
|
|
|
setPing(Settings::globalInstance()->botPing());
|
|
|
-
|
|
|
- /* Only say hi if hi is scheduled */
|
|
|
- if(myJoinMessageScheduled)
|
|
|
- {
|
|
|
- myJoinMessageTimer->start(Settings::globalInstance()->timeToSayHiAfterConnected()*1000);
|
|
|
- myJoinMessagePrinted = false;
|
|
|
- myJoinMessageScheduled = false;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
|