summaryrefslogtreecommitdiffstats
path: root/ksirc/ksircprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksirc/ksircprocess.cpp')
-rw-r--r--ksirc/ksircprocess.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/ksirc/ksircprocess.cpp b/ksirc/ksircprocess.cpp
index a5a82800..f37796de 100644
--- a/ksirc/ksircprocess.cpp
+++ b/ksirc/ksircprocess.cpp
@@ -130,11 +130,11 @@ KSircProcess::KSircProcess( TQString &server_id, KSircServer &kss, TQObject * pa
//server = tqstrdup(kss.server());
- TQDict<KSircMessageReceiver> nTopList(17, FALSE);
+ TQDict<KSircMessageReceiver> nTopList(17, false);
TopList = nTopList;
- // TopList.setAutoDelete(TRUE)
+ // TopList.setAutoDelete(true)
- auto_create_really = FALSE;
+ auto_create_really = false;
// Create the ksopts server structure
ksopts->serverSetup(kss);
@@ -151,16 +151,16 @@ KSircProcess::KSircProcess( TQString &server_id, KSircServer &kss, TQObject * pa
m_nick = qsNick;
- if((qsNick.isEmpty() == FALSE)){
+ if(!qsNick.isEmpty()){
proc->setEnvironment("SIRCNICK", qsNick);
}
- if((qsAltNick.isEmpty() == FALSE)){
+ if(!qsAltNick.isEmpty()){
proc->setEnvironment("BACKUPNICK", qsAltNick);
}
- if((qsRealname.isEmpty() == FALSE)){
+ if(!qsRealname.isEmpty()){
proc->setEnvironment("SIRCNAME", qsRealname);
}
- if((qsUserID.isEmpty() == FALSE)){
+ if(!qsUserID.isEmpty()){
proc->setEnvironment("SIRCUSER", qsUserID);
kdDebug(5008) << "Set SIRCUSER to: " << qsUserID << endl;
}
@@ -199,13 +199,13 @@ KSircProcess::KSircProcess( TQString &server_id, KSircServer &kss, TQObject * pa
// Create toplevel before iocontroller so it has somewhere to write stuff.
- running_window = TRUE; // True so we do create the default
- default_follow_focus = TRUE;
+ running_window = true; // True so we do create the default
+ default_follow_focus = true;
KSircChannel ci(kss.server(), "!no_channel");
new_toplevel(ci, true); //
TopList.replace("!default", TopList[ci.channel()]);
- running_window = FALSE; // set false so next changes the first name
+ running_window = false; // set false so next changes the first name
// Write default commands, and open default windows.
@@ -331,11 +331,11 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe)
{
static time_t last_window_open = 0;
static int number_open = 0;
- static bool flood_dlg = FALSE;
+ static bool flood_dlg = false;
- if(running_window == FALSE){ // If we're not fully running, reusing
+ if(!running_window){ // If we're not fully running, reusing
// !default window for next chan.
- running_window = TRUE;
+ running_window = true;
// insert and remove is done as a side effect of the control_message call
// TopList.insert(str, TopList["!no_channel"]);
// TopList.remove("!no_channel"); // We're no longer !no_channel
@@ -343,12 +343,12 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe)
}
else if(TopList.find(channelInfo.channel()) == 0x0){ // If the window doesn't exist, continue
// If AutoCreate windows is on, let's make sure we're not being flooded.
- if(ksopts->autoCreateWin == TRUE && safe == false){
+ if(ksopts->autoCreateWin && !safe){
time_t current_time = time(NULL);
if((channelInfo.channel()[0] != '#' || channelInfo.channel()[0] != '&') &&
((current_time - last_window_open) < 5)){
- if(number_open > 4 && flood_dlg == FALSE){
- flood_dlg = TRUE;
+ if(number_open > 4 && !flood_dlg){
+ flood_dlg = true;
int res = KMessageBox::warningYesNo(0,
i18n("5 Channel windows were opened "
"in less than 5 seconds. Someone "
@@ -369,7 +369,7 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe)
if(!safe)
number_open++;
}
- flood_dlg = FALSE;
+ flood_dlg = false;
}
else{
last_window_open = current_time;
@@ -401,7 +401,7 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe)
default_window(wm); // Set it to the default window.
emit ProcMessage(serverID(), ProcCommand::addTopLevel, channelInfo.channel());
- displayMgr->newTopLevel(wm, TRUE);
+ displayMgr->newTopLevel(wm, true);
displayMgr->setCaption(wm, channelInfo.channel());
// displayMgr->show(wm);
wm->lineEdit()->setFocus(); // Give focus back to the linee, someone takes it away on new create
@@ -415,7 +415,7 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe)
void KSircProcess::close_toplevel(KSircTopLevel *wm, TQString name)
{
- if(auto_create_really == TRUE)
+ if(auto_create_really)
turn_on_autocreate();
kdDebug(5008) << "KSP: get close_toplevel: " << name << endl;
@@ -455,13 +455,13 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, TQString name)
TopList.replace("!default", it.current());
// Let's let em know she's deleted!
- if(ksopts->autoCreateWin == TRUE){
+ if(ksopts->autoCreateWin){
emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, TQString());
TQTimer::singleShot(5000, this, TQ_SLOT(turn_on_autocreate()));
- auto_create_really = TRUE;
+ auto_create_really = true;
}
else{
- auto_create_really = FALSE;
+ auto_create_really = false;
}
delete guardedwm;
@@ -473,9 +473,9 @@ void KSircProcess::clean_toplevel(TQObject *clean){
tqWarning("Passed null to cleaner!!");
return;
}
- bool cont = FALSE;
+ bool cont = false;
do{
- cont = FALSE;
+ cont = false;
TQDictIterator<KSircMessageReceiver> it(TopList);
while(it.current() != 0x0){
if((TQObject *)it.current() == clean){
@@ -483,12 +483,12 @@ void KSircProcess::clean_toplevel(TQObject *clean){
while(TopList[key] != 0x0){
TopList.remove(key);
}
- cont = TRUE;
+ cont = true;
break;
}
++it;
}
- } while(cont == TRUE);
+ } while(cont);
}
void KSircProcess::request_quit( const TQCString& command )
@@ -525,7 +525,7 @@ void KSircProcess::default_window(KSircTopLevel *w)
// window on focus changes.
//
- if(w && (default_follow_focus == TRUE))
+ if(w && default_follow_focus)
TopList.replace("!default", w);
}
@@ -632,7 +632,7 @@ void KSircProcess::ServMessage(TQString dst_server, int command, TQString args)
void KSircProcess::turn_on_autocreate()
{
emit ProcMessage(serverID(), ProcCommand::turnOnAutoCreate, TQString());
- auto_create_really = FALSE;
+ auto_create_really = false;
}
void KSircProcess::setNick(const TQString nick)