diff options
| author | 2008-09-17 16:36:29 +0000 | |
|---|---|---|
| committer | 2008-09-17 16:36:29 +0000 | |
| commit | 7a47e356d0ae243c5e28a3e167b73d313e2a1973 (patch) | |
| tree | 8c8dbaf78759addbba5c4973461a5ce8b739a78b /src | |
| parent | removed conditional checks for Qt 4.4; (diff) | |
| download | KVIrc-7a47e356d0ae243c5e28a3e167b73d313e2a1973.tar.gz KVIrc-7a47e356d0ae243c5e28a3e167b73d313e2a1973.tar.bz2 KVIrc-7a47e356d0ae243c5e28a3e167b73d313e2a1973.zip | |
bumped to CMake 2.6.1;
removed old compat policies;
added doxygen comments;
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@2474 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/kvilib/config/kvi_sourcesdate.h | 1 | ||||
| -rw-r--r-- | src/kvirc/kernel/kvi_texticonmanager.cpp | 200 | ||||
| -rw-r--r-- | src/kvirc/kernel/kvi_texticonmanager.h | 201 | ||||
| -rw-r--r-- | src/kvirc/kernel/kvi_useraction.cpp | 7 | ||||
| -rw-r--r-- | src/kvirc/kernel/kvi_useraction.h | 63 |
6 files changed, 321 insertions, 156 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 81d1dfd3f..2d0791517 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,10 +1,9 @@ # CMakeLists for src/ IF(WIN32) - #we need this defined when compiling with cmake - ADD_DEFINITIONS(-DCOMPILE_USE_STANDALONE_MOC_SOURCES) + # We need this defined when compiling with cmake + ADD_DEFINITIONS(-DCOMPILE_USE_STANDALONE_MOC_SOURCES) ENDIF() # Find subdirs SUBDIRS(kvilib kvirc modules) - diff --git a/src/kvilib/config/kvi_sourcesdate.h b/src/kvilib/config/kvi_sourcesdate.h index a2a255c4e..f2f3cc1e8 100644 --- a/src/kvilib/config/kvi_sourcesdate.h +++ b/src/kvilib/config/kvi_sourcesdate.h @@ -41,6 +41,7 @@ /** * \brief This is the date of the sources before that we should force a setup +* * This is usually changed only when a setup is really needed because of an * incompatible change in the configuration files * .. so do NOT change it just when you change KVI_SOURCES_DATE_NUMERIC :) diff --git a/src/kvirc/kernel/kvi_texticonmanager.cpp b/src/kvirc/kernel/kvi_texticonmanager.cpp index e5d301a98..a099bc993 100644 --- a/src/kvirc/kernel/kvi_texticonmanager.cpp +++ b/src/kvirc/kernel/kvi_texticonmanager.cpp @@ -4,7 +4,7 @@ // Creation date : Thu 15 May 2002 12:04:12 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2002-2004 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2002-2008 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -22,9 +22,6 @@ // //============================================================================= - - - #define _KVI_TEXTICONMANAGER_CPP_ #include "kvi_iconmanager.h" @@ -40,12 +37,34 @@ #include <QPixmap> #include <QFile> +static KviTextIconAssocEntry default_associations[]= +{ + { ":)" , KVI_SMALLICON_SMILE }, + { ":*" , KVI_SMALLICON_KISS }, + { ":D" , KVI_SMALLICON_BIGGRIN }, + { ":(" , KVI_SMALLICON_UGLY }, + { ":/" , KVI_SMALLICON_ANGRY }, + { ":O" , KVI_SMALLICON_SURPRISED2 }, + { ":P" , KVI_SMALLICON_TONGUE }, + { ";)" , KVI_SMALLICON_EYE }, + { ":°)" , KVI_SMALLICON_TEARSMILE }, + { ":°" , KVI_SMALLICON_CRY }, + { ":S" , KVI_SMALLICON_AFRAID }, + { ":|" , KVI_SMALLICON_DEMORALIZED }, + { ":P°" , KVI_SMALLICON_SLURP }, + { 0 , 0 } +}; + KVIRC_API KviTextIconManager * g_pTextIconManager = 0; -KviTextIcon::KviTextIcon(QString szFile) : - m_iId(-1), m_szFilename(szFile) +KviTextIcon::KviTextIcon(int iId) +: m_iId(iId),m_pAnimatedPixmap(0) { +} +KviTextIcon::KviTextIcon(QString szFile) +: m_iId(-1), m_szFileName(szFile) +{ QString szRetPath; if (g_pApp->findImage(szRetPath, szFile)) @@ -57,37 +76,39 @@ KviTextIcon::KviTextIcon(QString szFile) : } else { m_pAnimatedPixmap->stop(); } - } - else - { + } else { m_pAnimatedPixmap = 0; } } -KviTextIcon::KviTextIcon(KviTextIcon* icon) +KviTextIcon::KviTextIcon(KviTextIcon * pIcon) { - m_iId = icon->id(); - m_szFilename = icon->m_szFilename; - if (icon->m_pAnimatedPixmap) + m_iId = pIcon->id(); + m_szFileName = pIcon->m_szFileName; + if (pIcon->m_pAnimatedPixmap) { m_pAnimatedPixmap = new KviAnimatedPixmap(m_pAnimatedPixmap); - } - else - { + } else { m_pAnimatedPixmap = 0; } } -void KviTextIcon::setId(int id) +KviTextIcon::~KviTextIcon() +{ + if(m_pAnimatedPixmap) + delete m_pAnimatedPixmap; +} + +void KviTextIcon::setId(int iId) { - m_iId=id; - m_szFilename=QString::null; + m_iId = iId; + m_szFileName=QString::null; } -void KviTextIcon::setFilename(QString filename) +void KviTextIcon::setFilename(QString szFileName) { - m_iId=-1; - m_szFilename=filename; + m_iId = -1; + m_szFileName = szFileName; } QPixmap * KviTextIcon::pixmap() @@ -100,7 +121,7 @@ QPixmap * KviTextIcon::pixmap() // Users of this class expect the pointer to be permanent while // g_pIconManager returns temporary pointers. // KviIrcView will happily crash dereferencing a hollow pointer sooner or later - return g_pIconManager->getPixmap(m_szFilename); + return g_pIconManager->getPixmap(m_szFileName); } } @@ -121,45 +142,21 @@ void KviTextIconManager::clear() m_pTextIconDict->clear(); } -void KviTextIconManager::insert(const QString &name,int id) +void KviTextIconManager::insert(const QString & szName, int iId) { - m_pTextIconDict->replace(name,new KviTextIcon(id)); + m_pTextIconDict->replace(szName, new KviTextIcon(iId)); emit changed(); } -void KviTextIconManager::insert(const QString &name,KviTextIcon& icon) +void KviTextIconManager::insert(const QString & szName,KviTextIcon & icon) { - m_pTextIconDict->replace(name,new KviTextIcon(&icon)); + m_pTextIconDict->replace(szName, new KviTextIcon(&icon)); emit changed(); } -typedef struct _KviTextIconAssocEntry -{ - const char * name; - int iVal; -} KviTextIconAssocEntry; - -static KviTextIconAssocEntry default_associations[]= -{ - { ":)" , KVI_SMALLICON_SMILE }, - { ":*" , KVI_SMALLICON_KISS }, - { ":D" , KVI_SMALLICON_BIGGRIN }, - { ":(" , KVI_SMALLICON_UGLY }, - { ":/" , KVI_SMALLICON_ANGRY }, - { ":O" , KVI_SMALLICON_SURPRISED2 }, - { ":P" , KVI_SMALLICON_TONGUE }, - { ";)" , KVI_SMALLICON_EYE }, - { ":°)" , KVI_SMALLICON_TEARSMILE }, - { ":°" , KVI_SMALLICON_CRY }, - { ":S" , KVI_SMALLICON_AFRAID }, - { ":|" , KVI_SMALLICON_DEMORALIZED }, - { ":P°" , KVI_SMALLICON_SLURP }, - { 0 , 0 } -}; - void KviTextIconManager::checkDefaultAssociations() { - for(int i=0;default_associations[i].name;i++) + for(int i=0; default_associations[i].name; i++) { if(!m_pTextIconDict->find(default_associations[i].name)) insert(QString::fromUtf8(default_associations[i].name),default_associations[i].iVal); @@ -167,35 +164,33 @@ void KviTextIconManager::checkDefaultAssociations() emit changed(); } -// this MUST match the ConfigUpdate entry in the configuration -// file shipped with KVIrc. -#define TEXTICONMANAGER_CURRENT_CONFIG_UPDATE 3 - void KviTextIconManager::load() { - QString tmp; - int upd = 0; - if(g_pApp->getReadOnlyConfigPath(tmp,KVI_CONFIGFILE_TEXTICONS)) + QString szTmp; + int iUpd = 0; + if(g_pApp->getReadOnlyConfigPath(szTmp,KVI_CONFIGFILE_TEXTICONS)) { - upd = load(tmp,false); + iUpd = load(szTmp,false); } - if(upd == TEXTICONMANAGER_CURRENT_CONFIG_UPDATE)return; + if(iUpd == TEXTICONMANAGER_CURRENT_CONFIG_UPDATE) + return; // do a merge of the texticons if we have a new config version - g_pApp->getGlobalKvircDirectory(tmp,KviApp::Config,KVI_CONFIGFILE_TEXTICONS); - if(QFile::exists(tmp)) { - load(tmp,true); - } + g_pApp->getGlobalKvircDirectory(szTmp,KviApp::Config,KVI_CONFIGFILE_TEXTICONS); + + if(QFile::exists(szTmp)) + load(szTmp,true); } void KviTextIconManager::applyOptions() { for( - KviTextIcon* pIcon = m_pTextIconDict->first(); - pIcon; - pIcon = m_pTextIconDict->next() - ) { + KviTextIcon * pIcon = m_pTextIconDict->first(); + pIcon; + pIcon = m_pTextIconDict->next() + ) + { if(pIcon->animatedPixmap()) { if(KVI_OPTION_BOOL(KviOption_boolEnableAnimatedSmiles)) @@ -210,24 +205,24 @@ void KviTextIconManager::applyOptions() void KviTextIconManager::save() { - QString tmp; - g_pApp->getLocalKvircDirectory(tmp,KviApp::Config,KVI_CONFIGFILE_TEXTICONS); - save(tmp); + QString szTmp; + g_pApp->getLocalKvircDirectory(szTmp,KviApp::Config,KVI_CONFIGFILE_TEXTICONS); + save(szTmp); } -// returns the config update -int KviTextIconManager::load(const QString &filename,bool bMerge) +int KviTextIconManager::load(const QString & szFileName, bool bMerge) { - if(!bMerge)m_pTextIconDict->clear(); - KviConfig cfg(filename,KviConfig::Read); + if(!bMerge) m_pTextIconDict->clear(); + + KviConfig cfg(szFileName,KviConfig::Read); cfg.setGroup("Manager"); - int upd = cfg.readIntEntry("ConfigUpdate",0); + int iUpd = cfg.readIntEntry("ConfigUpdate",0); - KviConfigGroup * dict = cfg.dict()->find("TextIcons"); - if(dict) + KviConfigGroup * pDict = cfg.dict()->find("TextIcons"); + if(pDict) { - KviConfigGroupIterator it(*dict); + KviConfigGroupIterator it(*pDict); KviPointerList<QString> names; names.setAutoDelete(true); @@ -240,35 +235,37 @@ int KviTextIconManager::load(const QString &filename,bool bMerge) cfg.setGroup("TextIcons"); - for(QString * s = names.first();s;s = names.next()) + for(QString * s = names.first(); s; s = names.next()) { - int id = cfg.readIntEntry(*s,-1); + int iId = cfg.readIntEntry(*s,-1); QString szTmp; - QPixmap * pix=0; -// debug("%s %s %i %i",__FILE__,__FUNCTION__,__LINE__,id); - if(id!=-1) { - pix = g_pIconManager->getSmallIcon(id); + QPixmap * pix = 0; + //debug("%s %s %i %i",__FILE__,__FUNCTION__,__LINE__,id); + if(iId != -1) + { + pix = g_pIconManager->getSmallIcon(iId); } else { - szTmp=cfg.readEntry(*s); + szTmp = cfg.readEntry(*s); pix=g_pIconManager->getPixmap(szTmp); if(!pix) { - id=KVI_SMALLICON_HELP; - pix = g_pIconManager->getSmallIcon(id); + iId = KVI_SMALLICON_HELP; + pix = g_pIconManager->getSmallIcon(iId); } } + if(pix) { if(bMerge) { if(!m_pTextIconDict->find(*s)) - if(id!=-1) - m_pTextIconDict->replace(*s,new KviTextIcon(id)); + if(iId != -1) + m_pTextIconDict->replace(*s,new KviTextIcon(iId)); else m_pTextIconDict->replace(*s,new KviTextIcon(szTmp)); } else { - if(id!=-1) - m_pTextIconDict->replace(*s,new KviTextIcon(id)); + if(iId != -1) + m_pTextIconDict->replace(*s,new KviTextIcon(iId)); else m_pTextIconDict->replace(*s,new KviTextIcon(szTmp)); } @@ -279,26 +276,25 @@ int KviTextIconManager::load(const QString &filename,bool bMerge) checkDefaultAssociations(); emit changed(); - return upd; + return iUpd; } -void KviTextIconManager::save(const QString &filename) +void KviTextIconManager::save(const QString & szFileName) { - KviConfig cfg(filename,KviConfig::Write); + KviConfig cfg(szFileName,KviConfig::Write); cfg.setGroup("Manager"); cfg.writeEntry("ConfigUpdate",TEXTICONMANAGER_CURRENT_CONFIG_UPDATE); - cfg.setGroup("TextIcons"); KviPointerHashTableIterator<QString,KviTextIcon> it(*m_pTextIconDict); - while(KviTextIcon * i = it.current()) + while(KviTextIcon * pIcon = it.current()) { - if(i->id()!=-1) - cfg.writeEntry(it.currentKey(),i->id()); + if(pIcon->id() != -1) + cfg.writeEntry(it.currentKey(),pIcon->id()); else - cfg.writeEntry(it.currentKey(),i->filename()); + cfg.writeEntry(it.currentKey(),pIcon->filename()); ++it; } } @@ -306,4 +302,4 @@ void KviTextIconManager::save(const QString &filename) #ifndef COMPILE_USE_STANDALONE_MOC_SOURCES #include "kvi_texticonmanager.moc" using namespace KviAnimatedPixmap; -#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES +#endif //COMPILE_USE_STANDALONE_MOC_SOURCES diff --git a/src/kvirc/kernel/kvi_texticonmanager.h b/src/kvirc/kernel/kvi_texticonmanager.h index 5237a64b3..3e11446fc 100644 --- a/src/kvirc/kernel/kvi_texticonmanager.h +++ b/src/kvirc/kernel/kvi_texticonmanager.h @@ -7,7 +7,7 @@ // Creation date : Thu 15 May 2002 12:04:12 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2002-2004 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2002-2008 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -25,63 +25,220 @@ // //============================================================================= +/** +* \file kvi_texticonmanager.h +* \author Szymon Stefanek +* \brief +* +* \def TEXTICONMANAGER_CURRENT_CONFIG_UPDATE This MUST match the ConfigUpdate entry in the configuration file shipped with KVIrc +*/ + #include "kvi_settings.h" #include "kvi_pointerhashtable.h" +#include "kvi_animatedpixmap.h" #include <QPixmap> -#include "kvi_animatedpixmap.h" +#define TEXTICONMANAGER_CURRENT_CONFIG_UPDATE 3 + +/** +* \typedef KviTextIconAssocEntry +* \struct _KviTextIconAssocEntry +* \brief A struct that contains the icon association entries +*/ +typedef struct _KviTextIconAssocEntry +{ + const char * name; /**< the name of the icon */ + int iVal; /**< the id of the icon */ +} KviTextIconAssocEntry; + +/** +* \class KviTextIcon +* \brief The class that holds the icons +*/ class KVIRC_API KviTextIcon { protected: - int m_iId; - QString m_szFilename; - KviAnimatedPixmap* m_pAnimatedPixmap; + int m_iId; + QString m_szFileName; + KviAnimatedPixmap * m_pAnimatedPixmap; public: - inline KviTextIcon(int id) - : m_iId(id),m_pAnimatedPixmap(0) {}; + /** + * \brief Constructs the icon object + * \param iId The id of the icon + * \return KviTextIcon + */ + KviTextIcon(int iId); + + /** + * \brief Constructs the icon object + * \param szFile The filename the icon + * \return KviTextIcon + */ KviTextIcon(QString szFile); - KviTextIcon(KviTextIcon* icon); - inline ~KviTextIcon(){ if(m_pAnimatedPixmap) delete m_pAnimatedPixmap;}; + + /** + * \brief Constructs the icon object + * \param pIcon The pointer to the icon + * \return KviTextIcon + */ + KviTextIcon(KviTextIcon * pIcon); + + /** + * \brief Destroys the icon object + */ + ~KviTextIcon(); public: + /** + * \brief Returns the id of the icon + * \return int + */ inline int id(){ return m_iId; }; - void setId(int id); - void setFilename(QString filename); - inline QString filename(){ return m_szFilename; }; - QPixmap * pixmap(); - inline KviAnimatedPixmap* animatedPixmap() { return m_pAnimatedPixmap; }; + + /** + * \brief Sets the id of the icon + * \param iId The id of the icon + * \return void + */ + void setId(int iId); + + /** + * \brief Sets the filename of the icon + * \param szFileName The filename of the icon + * \return void + */ + void setFilename(QString szFileName); + + /** + * \brief Returns the filename of the icon + * \return QString + */ + inline QString filename(){ return m_szFileName; }; + + /** + * \brief Returns the pixmap associated to the icon + * \return QPixmap * + */ + QPixmap * pixmap(); + + /** + * \brief Returns the animated pixmap associated to the icon + * \return KviAnimatedPixmap * + */ + inline KviAnimatedPixmap * animatedPixmap(){ return m_pAnimatedPixmap; }; }; +/** +* \class KviTextIconManager +* \brief The class that manages the icons +*/ class KVIRC_API KviTextIconManager : public QObject { friend class KviTextIconWindow; friend class KviTextIconsOptionsWidget; Q_OBJECT public: + /** + * \brief Constructs the icon manager object + * \return KviTextIconManager + */ KviTextIconManager(); + + /** + * \brief Destroys the icon manager object + */ ~KviTextIconManager(); private: KviPointerHashTable<QString,KviTextIcon> * m_pTextIconDict; -signals: - void changed(); public: + /** + * \brief Returns the dictionary of the icons + * \return KviPointerHashTable<QString,KviTextIcon> * + */ inline KviPointerHashTable<QString,KviTextIcon> * textIconDict(){ return m_pTextIconDict; }; + + /** + * \brief Checks and updates the default associations + * \return void + */ void checkDefaultAssociations(); + + /** + * \brief Clears the dictionary + * \return void + */ void clear(); - void insert(const QString &name,int id); - void insert(const QString &name,KviTextIcon& icon); - inline KviTextIcon * lookupTextIcon(const QString &name){ return m_pTextIconDict->find(name); }; + + /** + * \brief Inserts an icon in the dictionary + * \param szName The name of the icon + * \param iId The id of the icon + * \return void + */ + void insert(const QString & szName, int iId); + + /** + * \brief Inserts an icon in the dictionary + * \param szName The name of the icon + * \param icon The icon + * \return void + */ + void insert(const QString & szName, KviTextIcon & icon); + + /** + * \brief Returns the text of the icon + * \param szName The name of the icon + * \return KviTextIcon * + */ + inline KviTextIcon * lookupTextIcon(const QString & szName){ return m_pTextIconDict->find(szName); }; + + /** + * \brief Loads the dictionary + * \return void + */ void load(); + + /** + * \brief Saves the dictionary + * \return void + */ void save(); + + /** + * \brief Applies the options + * \return void + */ void applyOptions(); protected: - void save(const QString &filename); - int load(const QString &filename,bool bMerge = false); + /** + * \brief Saves the dictionary to a file + * + * This is the real save() function + * \param szFileName The filename where to save + * \return void + */ + void save(const QString & szFileName); + + /** + * \brief Loads the dictionary from a file + * + * This is the real load() function + * It returns the config update + * \param szFileName The filename from where to load + * \param bMerge Whether to merge the existing dictionary with the loaded one + * \return int + */ + int load(const QString & szFileName, bool bMerge = false); +signals: + /** + * \brief Called when the default associations change + * \return void + */ + void changed(); }; #ifndef _KVI_TEXTICONMANAGER_CPP_ extern KVIRC_API KviTextIconManager * g_pTextIconManager; #endif - #endif //_KVI_TEXTICONMANAGER_H_ diff --git a/src/kvirc/kernel/kvi_useraction.cpp b/src/kvirc/kernel/kvi_useraction.cpp index b188e17cd..a3779a9ed 100644 --- a/src/kvirc/kernel/kvi_useraction.cpp +++ b/src/kvirc/kernel/kvi_useraction.cpp @@ -4,7 +4,7 @@ // Creation date : Tue Mar 18 2003 13:36:12 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2003 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2003-2008 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -22,11 +22,9 @@ // //============================================================================= - - #include "kvi_useraction.h" -static int useraction_table[KVI_NUM_USERACTION_TYPES]= +static int useraction_table[KVI_NUM_USERACTION_TYPES] = { 25, // ACTION (typically human) 25, // PRIVMSG @@ -43,4 +41,3 @@ int kvi_getUserActionTemperature(unsigned int uIdx) { return useraction_table[uIdx]; } - diff --git a/src/kvirc/kernel/kvi_useraction.h b/src/kvirc/kernel/kvi_useraction.h index e85c72297..7ba4e41c9 100644 --- a/src/kvirc/kernel/kvi_useraction.h +++ b/src/kvirc/kernel/kvi_useraction.h @@ -3,11 +3,11 @@ //============================================================================= // -// File : kvi_userlistview.h +// File : kvi_useraction.h // Creation date : Tue Mar 18 2003 13:36:12 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2003 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2003-2008 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -25,10 +25,36 @@ // //============================================================================= -#include "kvi_settings.h" +/** +* \file kvi_useraction.h +* \author Szymon Stefanek +* \brief This file defines the user action "temperatures" +* +* The more "hot" is an action, the more humanity is in it +* +* \def KVI_USERACTION_ACTION The action 'action' +* \def KVI_USERACTION_PRIVMSG The action 'message' (channel message) +* \def KVI_USERACTION_NOTICE The action 'notice' +* \def KVI_USERACTION_TOPIC The action 'topic' +* \def KVI_USERACTION_KICK The action 'kick' +* \def KVI_USERACTION_NICK The action 'nick' +* \def KVI_USERACTION_CHANMODE The action 'mode' (channel mode) +* \def KVI_USERACTION_JOIN The action 'join' +* \def KVI_USERACTION_PART The action 'part' +* \def KVI_NUM_USERACTION_TYPES The number of actions' type +* +* These are the temperature levels for a single user on a channel +* +* \def KVI_MAX_TEMPERATURE Maximum: can't go above this +* \def KVI_HOT_TEMPERATURE Hot: human +* \def KVI_HALF_HOT_TEMPERATURE Half hot: signs of humanity +* \def KVI_MID_TEMPERATURE Mid: uncertain +* \def KVI_HALF_COLD_TEMPERATURE Half cold: automa ? +* \def KVI_COLD_TEMPERATURE Cold: bot +* \def KVI_MIN_TEMPERATURE Minimum: can't drop below this +*/ -// This file defines the user action "temperatures". -// The more "hot" is an action, the more humanity is in it +#include "kvi_settings.h" #define KVI_USERACTION_ACTION 0 #define KVI_USERACTION_PRIVMSG 1 @@ -42,9 +68,13 @@ #define KVI_NUM_USERACTION_TYPES 9 - -extern KVIRC_API int kvi_getUserActionTemperature(unsigned int uIdx); - +#define KVI_MAX_TEMPERATURE 150 +#define KVI_HOT_TEMPERATURE 100 +#define KVI_HALF_HOT_TEMPERATURE 40 +#define KVI_MID_TEMPERATURE 0 +#define KVI_HALF_COLD_TEMPERATURE -40 +#define KVI_COLD_TEMPERATURE -100 +#define KVI_MIN_TEMPERATURE -150 // // ACTION 30 @@ -63,21 +93,6 @@ extern KVIRC_API int kvi_getUserActionTemperature(unsigned int uIdx); // JOIN -30 // -// These are the temperature levels for a single user on a channel - -// Maximum : can't go above this -#define KVI_MAX_TEMPERATURE 150 -// Hot : human -#define KVI_HOT_TEMPERATURE 100 -// Half hot : signs of humanity -#define KVI_HALF_HOT_TEMPERATURE 40 -// Mid : uncertain -#define KVI_MID_TEMPERATURE 0 -// Half cold : automa ? -#define KVI_HALF_COLD_TEMPERATURE -40 -// Cold : bot -#define KVI_COLD_TEMPERATURE -100 -// Minimum : can't drop below this -#define KVI_MIN_TEMPERATURE -150 +extern KVIRC_API int kvi_getUserActionTemperature(unsigned int uIdx); #endif // _KVI_USERACTION_H_ |
