11 #include "hugglequeuefilter.hpp"
13 using namespace Huggle;
16 QList<HuggleQueueFilter*> HuggleQueueFilter::Filters;
18 HuggleQueueFilter::HuggleQueueFilter()
20 QueueName =
"default";
21 this->IgnoreBots =
true;
22 this->IgnoreWL =
true;
23 this->IgnoreFriends =
true;
24 this->IgnoreIP =
false;
25 this->IgnoreMinor =
false;
26 this->IgnoreNP =
false;
27 this->IgnoreUsers =
false;
28 this->IgnoreTalk =
true;
31 bool HuggleQueueFilter::Matches(
WikiEdit *edit)
35 throw new Exception(
"WikiEdit *edit must not be NULL in this context",
"bool HuggleQueueFilter::Matches(WikiEdit *edit)");
42 while (i < Configuration::LocalConfig_IgnorePatterns.count())
44 if (edit->
Page->
PageName.contains(Configuration::LocalConfig_IgnorePatterns.at(i)))
50 if (Configuration::LocalConfig_Ignores.contains(edit->
Page->
PageName))
62 if (edit->
Minor && this->IgnoreMinor)
66 if (edit->
NewPage && this->IgnoreNP)
70 if (edit->
Bot && IgnoreBots)
139 return IgnoreFriends;
144 IgnoreFriends = value;
bool getIgnoreMinor() const
Filter that can be applied to edit queue.
bool NewPage
Edit is a new page.
void setIgnoreBots(bool value)
bool IsTalk()
Return true in case this is a talk page.
bool getIgnoreUsers() const
void setIgnoreNP(bool value)
void setIgnoreMinor(bool value)
bool IsWhitelisted()
Returns true if this user is wl.
Every exception raised by huggle is defined by this class.
bool Minor
Edit is a minor edit.
bool getIgnoreFriends() const
void setIgnoreIP(bool value)
bool getIgnoreBots() const
WikiUser * User
User who changed the page.
void setIgnoreFriends(bool value)
void setIgnoreUsers(bool value)
QString PageName
Name of page.
bool Bot
Edit is a bot edit.
WikiPage * Page
Page that was changed by edit.
void setIgnoreWL(bool value)