aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/socketspy
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/socketspy')
-rw-r--r--src/modules/socketspy/SocketSpyWindow.cpp21
-rw-r--r--src/modules/socketspy/SocketSpyWindow.h6
-rw-r--r--src/modules/socketspy/libkvisocketspy.cpp27
3 files changed, 27 insertions, 27 deletions
diff --git a/src/modules/socketspy/SocketSpyWindow.cpp b/src/modules/socketspy/SocketSpyWindow.cpp
index 5e69a087f..1789b35de 100644
--- a/src/modules/socketspy/SocketSpyWindow.cpp
+++ b/src/modules/socketspy/SocketSpyWindow.cpp
@@ -35,12 +35,12 @@
extern KviPointerList<SocketSpyWindow> * g_pSocketSpyWindowList;
SocketSpyWindow::SocketSpyWindow(KviConsoleWindow * lpConsole)
-: KviWindow(KviWindow::SocketSpy,"socket_spy",lpConsole), KviIrcDataStreamMonitor(lpConsole->context())
+ : KviWindow(KviWindow::SocketSpy, "socket_spy", lpConsole), KviIrcDataStreamMonitor(lpConsole->context())
{
g_pSocketSpyWindowList->append(this);
- m_pSplitter = new KviTalSplitter(Qt::Horizontal,this);
+ m_pSplitter = new KviTalSplitter(Qt::Horizontal, this);
setObjectName("spysocket_splitter");
- m_pIrcView = new KviIrcView(m_pSplitter,this);
+ m_pIrcView = new KviIrcView(m_pSplitter, this);
// Ensure proper focusing
//setFocusHandler(m_pIrcView,this);
}
@@ -62,7 +62,7 @@ QPixmap * SocketSpyWindow::myIconPtr()
void SocketSpyWindow::resizeEvent(QResizeEvent *)
{
- m_pSplitter->setGeometry(0,0,width(),height());
+ m_pSplitter->setGeometry(0, 0, width(), height());
}
QSize SocketSpyWindow::sizeHint() const
@@ -70,9 +70,9 @@ QSize SocketSpyWindow::sizeHint() const
return m_pIrcView->sizeHint();
}
-void SocketSpyWindow::getBaseLogFileName(QString &buffer)
+void SocketSpyWindow::getBaseLogFileName(QString & buffer)
{
- buffer.sprintf("SOCKETSPY_%d",context()->id());
+ buffer.sprintf("SOCKETSPY_%d", context()->id());
}
void SocketSpyWindow::fillCaptionBuffers()
@@ -82,25 +82,24 @@ void SocketSpyWindow::fillCaptionBuffers()
bool SocketSpyWindow::incomingMessage(const char * message)
{
- outputNoFmt(KVI_OUT_SOCKETMESSAGE,console()->decodeText(message));
+ outputNoFmt(KVI_OUT_SOCKETMESSAGE, console()->decodeText(message));
return false;
}
bool SocketSpyWindow::outgoingMessage(const char * message)
{
- outputNoFmt(KVI_OUT_RAW,console()->decodeText(message));
+ outputNoFmt(KVI_OUT_RAW, console()->decodeText(message));
return false;
-
}
void SocketSpyWindow::connectionInitiated()
{
- output(KVI_OUT_SOCKETWARNING,__tr2qs("Socket open"));
+ output(KVI_OUT_SOCKETWARNING, __tr2qs("Socket open"));
}
void SocketSpyWindow::connectionTerminated()
{
- output(KVI_OUT_SOCKETWARNING,__tr2qs("Socket closed"));
+ output(KVI_OUT_SOCKETWARNING, __tr2qs("Socket closed"));
}
void SocketSpyWindow::applyOptions()
diff --git a/src/modules/socketspy/SocketSpyWindow.h b/src/modules/socketspy/SocketSpyWindow.h
index 859a8d498..839901d10 100644
--- a/src/modules/socketspy/SocketSpyWindow.h
+++ b/src/modules/socketspy/SocketSpyWindow.h
@@ -36,12 +36,14 @@ class SocketSpyWindow : public KviWindow, public KviIrcDataStreamMonitor
public:
SocketSpyWindow(KviConsoleWindow * lpConsole);
~SocketSpyWindow();
+
protected:
virtual QPixmap * myIconPtr();
virtual void fillCaptionBuffers();
- virtual void resizeEvent(QResizeEvent *e);
- virtual void getBaseLogFileName(QString &buffer);
+ virtual void resizeEvent(QResizeEvent * e);
+ virtual void getBaseLogFileName(QString & buffer);
virtual void applyOptions();
+
public:
virtual QSize sizeHint() const;
virtual bool incomingMessage(const char * message);
diff --git a/src/modules/socketspy/libkvisocketspy.cpp b/src/modules/socketspy/libkvisocketspy.cpp
index 08bb5e14a..81995cc5f 100644
--- a/src/modules/socketspy/libkvisocketspy.cpp
+++ b/src/modules/socketspy/libkvisocketspy.cpp
@@ -32,7 +32,6 @@
KviPointerList<SocketSpyWindow> * g_pSocketSpyWindowList = 0;
-
/*
@doc: socketspy.open
@type:
@@ -51,8 +50,9 @@ KviPointerList<SocketSpyWindow> * g_pSocketSpyWindowList = 0;
static bool socketspy_kvs_cmd_open(KviKvsModuleCommandCall * c)
{
- if(!c->window()->console())return c->context()->errorNoIrcContext();
- SocketSpyWindow *w = new SocketSpyWindow(c->window()->console());
+ if(!c->window()->console())
+ return c->context()->errorNoIrcContext();
+ SocketSpyWindow * w = new SocketSpyWindow(c->window()->console());
g_pMainWindow->addWindow(w);
return true;
}
@@ -62,7 +62,7 @@ static bool socketspy_module_init(KviModule * m)
g_pSocketSpyWindowList = new KviPointerList<SocketSpyWindow>;
g_pSocketSpyWindowList->setAutoDelete(false);
- KVSM_REGISTER_SIMPLE_COMMAND(m,"open",socketspy_kvs_cmd_open);
+ KVSM_REGISTER_SIMPLE_COMMAND(m, "open", socketspy_kvs_cmd_open);
return true;
}
@@ -81,13 +81,12 @@ static bool socketspy_module_can_unload(KviModule *)
}
KVIRC_MODULE(
- "SocketSpy", // module name
- "4.0.0", // module version
- "Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)", // author & (C)
- "SocketSpy IRC socket traffic monitor",
- socketspy_module_init,
- socketspy_module_can_unload,
- 0,
- socketspy_module_cleanup,
- 0
-)
+ "SocketSpy", // module name
+ "4.0.0", // module version
+ "Copyright (C) 2000 Szymon Stefanek (pragma at kvirc dot net)", // author & (C)
+ "SocketSpy IRC socket traffic monitor",
+ socketspy_module_init,
+ socketspy_module_can_unload,
+ 0,
+ socketspy_module_cleanup,
+ 0)