[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenetwork/kopete/libkopete
From:       Jason Keirstead <jason () keirstead ! org>
Date:       2005-04-04 19:16:26
Message-ID: 20050404191626.9B50463E () office ! kde ! org
[Download RAW message or body]

CVS commit by brunes: 

Add /nick command

BUG:103143


  M +8 -0      kopetecommandhandler.cpp   1.44
  M +1 -0      kopetecommandhandler.h   1.27


--- kdenetwork/kopete/libkopete/kopetecommandhandler.cpp  #1.43:1.44
@@ -130,4 +130,7 @@ Kopete::CommandHandler::CommandHandler()
                         "useful for scripts." ), 1 );
 
+        registerCommand( this, QString::fromLatin1("nick"), SLOT( slotNickCommand( \
const QString &, Kopete::ChatSession * ) ), +                i18n( "USAGE: /nick \
<nickname> - Change your nickname to the given one." ), 1 ); +
         registerCommand( this, QString::fromLatin1("exec"), SLOT( slotExecCommand( \
                const QString &, Kopete::ChatSession * ) ),
                 i18n( "USAGE: /exec [-o] <command> - Executes the specified command \
and displays the output in the chat buffer. " @@ -269,4 +272,9 @@ void \
Kopete::CommandHandler::slotSayComm  }
 
+void Kopete::CommandHandler::slotNickCommand( const QString & args, \
Kopete::ChatSession *manager ) +{
+        manager->account()->myself()->setDisplayName( args );
+}
+
 void Kopete::CommandHandler::slotExecCommand( const QString &args, \
Kopete::ChatSession *manager )  {

--- kdenetwork/kopete/libkopete/kopetecommandhandler.h  #1.26:1.27
@@ -187,4 +187,5 @@ class KOPETE_EXPORT CommandHandler : pub
                 void slotAwayAllCommand( const QString & args, Kopete::ChatSession \
                *manager );
                 void slotSayCommand( const QString & args, Kopete::ChatSession \
*manager ); +                void slotNickCommand( const QString & args, \
Kopete::ChatSession *manager );  
         private:


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic