summaryrefslogtreecommitdiffstats
path: root/ksirc/chanparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksirc/chanparser.cpp')
-rw-r--r--ksirc/chanparser.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/ksirc/chanparser.cpp b/ksirc/chanparser.cpp
index ad729924..6ebd7de8 100644
--- a/ksirc/chanparser.cpp
+++ b/ksirc/chanparser.cpp
@@ -35,8 +35,8 @@ ChannelParser::ChannelParser(KSircTopLevel *_top)
current_item = -1;
top_item = 0;
- if(parserTable.isEmpty() == TRUE){
- parserTable.setAutoDelete(TRUE);
+ if(parserTable.isEmpty()){
+ parserTable.setAutoDelete(true);
parserTable.insert("`l`", new parseFunc(&ChannelParser::parseSSFEClear));
parserTable.insert("`s`", new parseFunc(&ChannelParser::parseSSFEStatus));
parserTable.insert("`i`", new parseFunc(&ChannelParser::parseSSFEInit));
@@ -118,7 +118,7 @@ parseResult * ChannelParser::parseSSFEClear(TQString string)
{
// top->mainw->clear();
top->clearWindow();
-// top->mainw->repaint(TRUE);
+// top->mainw->repaint(true);
string.truncate(0);
return new parseSucc(TQString()); // Null string, don't display anything
}
@@ -226,12 +226,12 @@ parseResult * ChannelParser::parseSSFEStatus(TQString string)
// If we're an op,,
// update the nicks popup menu
top->channelButtons->setButtonsEnabled(true); // set the buttons enabled if were an op
- top->opami = TRUE;
+ top->opami = true;
} // opami = true sets us to an op
else {
top->channelButtons->setButtonsEnabled(false); // set the buttons enabled if were an op
- top->opami = FALSE;
- } // FALSE, were not an ops
+ top->opami = false;
+ } // false, were not an ops
top->UserUpdateMenu(); // update the menu
top->setCaption(status_line);
top->setIconText(status_line);
@@ -271,7 +271,7 @@ parseResult * ChannelParser::parseSSFEMsg(TQString string)
parseResult * ChannelParser::parseSSFEPrompt(TQString string)
{
- if(prompt_active == FALSE){
+ if(!prompt_active){
TQString prompt, caption;
ssfePrompt *sp;
@@ -279,7 +279,7 @@ parseResult * ChannelParser::parseSSFEPrompt(TQString string)
// First remove the prompt message from the Buffer.
// (it's garunteed to be the first one)
top->LineBuffer.remove( *top->LineBuffer.begin() );
- top->Buffer = FALSE;
+ top->Buffer = false;
top->sirc_receive(TQString(""));
// "'[pP]' " gives 4 spaces
@@ -287,14 +287,14 @@ parseResult * ChannelParser::parseSSFEPrompt(TQString string)
caption = "";
else
caption = string.mid(3);
- prompt_active = TRUE;
+ prompt_active = true;
// If we use this, then it blows up
// if we haven't popped up on the remote display yet.
KSirc::TextParagIterator it = top->mainw->firstParag();
TQString last;
- while(it.atEnd() == FALSE) {
+ while(!it.atEnd()) {
last = it.plainText();
++it;
}
@@ -309,14 +309,14 @@ parseResult * ChannelParser::parseSSFEPrompt(TQString string)
sp = new ssfePrompt(prompt, 0);
sp->setCaption(caption);
if(string[1] == 'P')
- sp->setPassword(TRUE);
+ sp->setPassword(true);
sp->exec();
// cerr << "Entered: " << sp->text() << endl;
prompt = sp->text();
prompt += "\n";
emit top->outputUnicodeLine(prompt);
delete sp;
- prompt_active = FALSE;
+ prompt_active = false;
}
return new parseSucc(TQString()); // Null string, don't display anything
@@ -352,22 +352,22 @@ parseResult * ChannelParser::parseINFONicks(TQString in_string)
{
TQString string = in_string;
TQString channel_name;
- bool clear_box = FALSE;
+ bool clear_box = false;
// Check to see if it's a continued line
if(string[1] == 'C'){
string[1] = '!';
- clear_box = TRUE;
+ clear_box = true;
}
if(string[1] == '#'){
string[1] = '!';
- clear_box = FALSE;
+ clear_box = false;
}
else if(string[1] == 'c'){
if(current_item > 0)
top->nicks->setCurrentItem(current_item);
top->nicks->setTopItem(top_item);
- top->nicks->repaint(TRUE);
+ top->nicks->repaint(true);
return new parseSucc(TQString()); // Parsing ok, don't print anything though
}
else if(string[1] == '$'){
@@ -393,13 +393,13 @@ parseResult * ChannelParser::parseINFONicks(TQString in_string)
return new parseSucc(string,ksopts->infoColor,"user|misc4");
}
- if(clear_box == TRUE){
+ if(clear_box){
current_item = top->nicks->currentItem();
top_item = top->nicks->topItem();
top->nicks->clear();
}
- //int start = string.find(": ", 0, FALSE); // Find start of nicks
+ //int start = string.find(": ", 0, false); // Find start of nicks
//if (start < 0)
// return new parseError(string, i18n("Could not find start of nicks"));
//
@@ -413,31 +413,31 @@ parseResult * ChannelParser::parseINFONicks(TQString in_string)
TQString nick = *it;
nickListItem *irc = new nickListItem();
- bool done = FALSE;
+ bool done = false;
uint i;
for(i = 0; i < nick.length();i++){
switch(nick[0].unicode()){
case '@':
- irc->setOp(TRUE);
+ irc->setOp(true);
nick.remove(0,1);
break;
case '+':
- irc->setVoice(TRUE);
+ irc->setVoice(true);
nick.remove(0,1);
break;
case '#':
- irc->setAway(TRUE);
+ irc->setAway(true);
nick.remove(0,1);
break;
case '*':
- irc->setIrcOp(TRUE);
+ irc->setIrcOp(true);
nick.remove(0,1);
break;
default:
- done = TRUE;
+ done = true;
}
- if(done == TRUE)
+ if(done)
break;
}
@@ -520,7 +520,7 @@ parseResult * ChannelParser::parseINFOPart(TQString string)
* You have left channel <channel>
*/
rx.setPattern("You have left channel (\\S+)");
- if((foundNick == false) && (rx.search(string) != -1)) {
+ if(!foundNick && (rx.search(string) != -1)) {
TQString channel = rx.cap(1);
if(top->channelInfo().channel().lower() == channel.lower()) {
TQApplication::postEvent(top, new TQCloseEvent());
@@ -534,11 +534,11 @@ parseResult * ChannelParser::parseINFOPart(TQString string)
* You have been kicked off channel <channel>
*/
rx.setPattern("You have been kicked off channel (\\S+)");
- if((foundNick == false) && (rx.search(string) != -1)) {
+ if(!foundNick && (rx.search(string) != -1)) {
TQString channel = rx.cap(1);
if(top->channelInfo().channel().lower() != channel.lower())
return new parseWrongChannel(string, ksopts->errorColor, "user|kick");
- if (ksopts->autoRejoin == TRUE)
+ if (ksopts->autoRejoin)
{
TQString str = TQString("/join %1\n").arg(top->channelInfo().channel());
emit top->outputUnicodeLine(str);
@@ -576,7 +576,7 @@ parseResult * ChannelParser::parseINFOPart(TQString string)
* <nick> has left channel <channel>
*/
rx.setPattern("(\\S+) has left channel (\\S+)");
- if((foundNick == false) && (rx.search(string) != -1)) {
+ if(!foundNick && (rx.search(string) != -1)) {
nick = rx.cap(1);
TQString channel = rx.cap(2);
// kdDebug(5008) << "Nick: " << nick << " Channel: " << channel << " top: " << top->channelInfo().channel() << endl;
@@ -593,7 +593,7 @@ parseResult * ChannelParser::parseINFOPart(TQString string)
* "<nick> has been kicked off channel <channel>"
*/
rx.setPattern("(\\S+) has been kicked off channel (\\S+)");
- if((foundNick == false) && (rx.search(string) != -1)) {
+ if(!foundNick && (rx.search(string) != -1)) {
nick = rx.cap(1);
TQString channel = rx.cap(2);
if(top->channelInfo().channel().lower() == channel.lower()) {
@@ -678,7 +678,7 @@ parseResult * ChannelParser::parseINFOChangeNick(TQString string)
top->changeCompleteNick(old_nick, new_nick);
top->nicks->setCurrentItem(selection);
- top->nicks->repaint(TRUE);
+ top->nicks->repaint(true);
// We're done, so let's finish up
return new parseSucc(" " + string, ksopts->channelColor, "user|join");
}
@@ -813,7 +813,7 @@ parseResult * ChannelParser::parseINFOMode(TQString string)
* -l doesn't take any arguments, so just add the mode and break
* +l otoh does, so read the argument
*/
- if(op == false){
+ if(!op){
pmList.append(new mode_info(op, 'l', TQString()));
break;
}
@@ -878,7 +878,7 @@ parseResult * ChannelParser::parseINFOMode(TQString string)
irc->setOp(mi->op());
// add new nick in sorted pass,with colour
top->nicks->inSort(irc);
- top->nicks->repaint(TRUE);
+ top->nicks->repaint(true);
}
else{
kdDebug(5008) << "Toplevel+o: nick search failed on " << mi->arg() << endl;
@@ -905,9 +905,9 @@ parseResult * ChannelParser::parseINFOMode(TQString string)
else if(mi->mode() == 'v'){
bool voice;
if(mi->op())
- voice = TRUE;
+ voice = true;
else
- voice = FALSE;
+ voice = false;
if(mi->arg().length() == 0){
tqWarning("Invalid nick in +-v mode change");