~ubuntu-branches/ubuntu/trusty/kvirc/trusty

« back to all changes in this revision

Viewing changes to src/modules/my/libkvimy.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kai Wasserbäch, Kai Wasserbäch, Raúl Sánchez Siles
  • Date: 2011-02-12 10:40:21 UTC
  • mfrom: (14.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110212104021-5mh4f75jlku20mnt
The combined "Twisted Experiment" and "Nocturnal Raid" release.

[ Kai Wasserbäch ]
* Synced to upstream's SVN revision 5467.
* debian/rules:
  - Added .PHONY line.
  - Resurrect -DMANUAL_REVISION, got lost somewhere and we build SVN
    revisions again.
  - Replace "-DWITH_NO_EMBEDDED_CODE=YES" with "-DWANT_CRYPTOPP=YES".
  - Change the remaining -DWITH/-DWITHOUT to the new -DWANT syntax.
* debian/control:
  - Removed DMUA, I'm a DD now.
  - Changed my e-mail address.
  - Removed unneeded relationships (no upgrades over two releases are
    supported).
  - Fix Suggests for kvirc-dbg.
  - kvirc-data: Make the "Suggests: kvirc" a Recommends, doesn't make much
    sense to install the -data package without the program.
* debian/source/local-options: Added with "unapply-patches".
* debian/kvirc.lintian-overrides: Updated to work for 4.1.1.
* debian/patches/21_make_shared-mime-info_B-D_superfluous.patch: Updated.
* debian/kvirc-data.install: Added .notifyrc.

[ Raúl Sánchez Siles ]
* Stating the right version where kvirc-data break and replace should happen.
* Fixing link to license file.
* Added French and Portuguese man pages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
//   File : libkvimy.cpp
4
4
//   Creation date : Mon Jul  1 02:46:49 2002 GMT by Szymon Stefanek
5
5
//
6
 
//   This file is part of the KVirc irc client distribution
7
 
//   Copyright (C) 2002-2008 Szymon Stefanek (pragma at kvirc dot net)
 
6
//   This file is part of the KVIrc irc client distribution
 
7
//   Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net)
8
8
//
9
9
//   This program is FREE software. You can redistribute it and/or
10
10
//   modify it under the terms of the GNU General Public License
22
22
//
23
23
//=============================================================================
24
24
 
25
 
#include "kvi_module.h"
26
 
#include "kvi_console.h"
27
 
#include "kvi_app.h"
28
 
#include "kvi_locale.h"
29
 
#include "kvi_irclink.h"
30
 
#include "kvi_ircconnection.h"
31
 
#include "kvi_ircconnectionuserinfo.h"
32
 
#include "kvi_ircconnectionserverinfo.h"
33
 
#include "kvi_ircserver.h"
 
25
#include "KviModule.h"
 
26
#include "KviConsoleWindow.h"
 
27
#include "KviApplication.h"
 
28
#include "KviLocale.h"
 
29
#include "KviIrcLink.h"
 
30
#include "KviIrcConnection.h"
 
31
#include "KviIrcConnectionUserInfo.h"
 
32
#include "KviIrcConnectionServerInfo.h"
 
33
#include "KviIrcServer.h"
34
34
 
35
 
#include "idle.h"
 
35
#include "Idle.h"
36
36
Idle* g_pIdle;
37
37
 
38
38
#define GET_KVS_CONSOLE \
39
39
        kvs_uint_t  uiWnd; \
40
 
        KviConsole *wnd =0; \
 
40
        KviConsoleWindow *wnd =0; \
41
41
        KVSM_PARAMETERS_BEGIN(c) \
42
42
                KVSM_PARAMETER("context_id",KVS_PT_UINT,KVS_PF_OPTIONAL,uiWnd) \
43
43
        KVSM_PARAMETERS_END(c) \
343
343
                in that irc_context.[br]
344
344
                Please note that this function returns the name of the server as reported
345
345
                by the server itself. Some servers report a bogus value for this field.
346
 
                You should take a look at $context.serverIpAddress or $context.serverHostName
347
 
                if you want a value that can be used to really reconnect to this server.
 
346
                You should take a look at [fnc]$context.serverIpAddress[/fnc] if you want a value that
 
347
                can be used to really reconnect to this server. If you want a value
 
348
                to manipulate the server entry via the serverdb functions then
 
349
                you probably need [fnc]$context.serverdbServerHostName[/fnc].
348
350
*/
349
351
 
350
352
static bool my_kvs_fnc_server(KviKvsModuleFunctionCall * c)
353
355
        if(wnd)
354
356
        {
355
357
                if(wnd->connection())
356
 
                        c->returnValue()->setString(wnd->connection()->serverInfo()->name());
 
358
                        c->returnValue()->setString(wnd->connection()->currentServerName());
357
359
        }
358
360
        return true;
359
361
}
381
383
        if(wnd)
382
384
        {
383
385
                if(wnd->connection())
384
 
                        c->returnValue()->setString(wnd->currentNetworkName().toUtf8().data());
 
386
                        c->returnValue()->setString(wnd->currentNetworkName());
385
387
        }
386
388
        return true;
387
389
}