mirror of
https://github.com/znc/znc.git
synced 2026-05-18 07:15:54 +02:00
Remove some code duplications and move functions into classes
This removes ReadFile(), WriteFile(), ReadLine(), Lower() and Upper() from Utils.h and adds CFile::ReadFile(). The biggest part of this patch fixes modules to use CFile and CString instead of these global functions. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1311 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+2
-2
@@ -70,7 +70,7 @@ public:
|
||||
for (unsigned int a = 0; a < m_vsSources.size(); a++) {
|
||||
const CWatchSource& WatchSource = m_vsSources[a];
|
||||
|
||||
if (sSource.AsLower().WildCmp(Lower(WatchSource.GetSource()))) {
|
||||
if (sSource.AsLower().WildCmp(WatchSource.GetSource().AsLower())) {
|
||||
if (WatchSource.IsNegated()) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
return (bGoodSource && Nick.GetHostMask().AsLower().WildCmp(Lower(m_sHostMask))) && sText.AsLower().WildCmp(Lower(m_sPattern));
|
||||
return (bGoodSource && Nick.GetHostMask().AsLower().WildCmp(m_sHostMask.AsLower())) && sText.AsLower().WildCmp(m_sPattern.AsLower());
|
||||
}
|
||||
|
||||
bool operator ==(const CWatchEntry& WatchEntry) {
|
||||
|
||||
Reference in New Issue
Block a user