From fbad6a9f89e360727e42820250c8bdbc8e820743 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Thu, 17 Aug 2006 02:24:45 +0000 Subject: test2 git-svn-id: http://svn.irssi.org/repos/irssi-python@4318 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- ChangeLog | 9 ++ INSTALL | 13 ++- README | 16 +-- TODO | 3 - configure.in | 4 +- docs/irssi-python.html | 284 ++++++++++++++++++++++++------------------------- src/Makefile.am | 10 +- src/pycore.c | 33 +++--- src/pycore.h | 4 +- src/pyirssi.h | 2 +- 10 files changed, 198 insertions(+), 180 deletions(-) diff --git a/ChangeLog b/ChangeLog index e69de29..a6d3ee8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -0,0 +1,9 @@ +loafier, 2006-08-14: + first release, test1 + +loafier, 2006-08-16: + second release, test2 + fixed up links in irssi-python.html + changed intstallation location of docs (irssi/docs/irssi-python.html -> doc/irssi/irssi-python.html) + added online help document ( -> irssi/help/py) + changed name of shared library from libirssi_python.so to libpython.so diff --git a/INSTALL b/INSTALL index 14b8d4e..98ae43c 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,11 @@ +Prior to building irssi-python, you'll need Python 2.4, glib 2.0, and Irssi +installed. + 1. Download and unpack the irssi source (ie irssi-0.8.10a.tar.gz) if you haven't done so already. irssi-python will need access to Irssi's headers. 2. Run the configure script, making sure to specify the correct location of - Irssi's distribution. For example: + Irssi's distribution with the --with-irssi switch. For example: $ configure --with-irssi=~/irssi-0.8.10 @@ -16,12 +19,12 @@ 3. As usual, run make. -4. make install if OK. libirssi_python.so should be copied to irssi/modules/, - scripts to irssi/scripts/ and irssi-python.html to irssi/docs/. +4. make install if OK. libpython.so should be copied to irssi/modules/, + scripts to irssi/scripts/ and irssi-python.html to doc/irssi/. -5. You should be able to load irssi_python in Irssi after installing, IE: +5. You should be able to load the module in Irssi after installing, IE: - /load irssi_python + /load python If you get missing pthread symbols, you may have to preload the thread safe C library before running irssi. export LD_PRELOAD=/usr/lib/libc_r.so seems to diff --git a/README b/README index e0b2434..6571bb4 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -irssi-python test1 +irssi-python test2 irssi-python embeds Python into an Irssi module, providing most of the functionality of the Perl wrapper to Python scripts using a similar interface. @@ -6,16 +6,16 @@ Read INSTALL for setup instructions. Currently, all of the objects and functions are accessible through the irssi module. See docs/irssi-python.html for a listing. Basic docs are also available -online in Irssi, as well. Use the /pyexec command to send commands to the Python +online in Irssi, as well. Use the /py exec command to send commands to the Python interpreter while in Irssi. This will print help for the Window object: - /pyexec import irssi - /pyexec help(irssi.Window) + /py exec import irssi + /py exec help(irssi.Window) -Other commands (XXX: change these to /py ): - /pyload load a Python script - /pyunload unload a Python script - /pylist list loaded scripts +Other commands: + /py load load a Python script + /py unload unload a Python script + /py list list loaded scripts diff --git a/TODO b/TODO index 1309eeb..2c87360 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,3 @@ --- Change commands from py to py (add space), and add help - documentation. - -- Fix loader to handle module hierarchies better. -- Add more example scripts. diff --git a/configure.in b/configure.in index 0a0e885..8482e81 100644 --- a/configure.in +++ b/configure.in @@ -2,10 +2,10 @@ # Process this file with autoconf to produce a configure script. #AC_PREREQ(2.59) -AC_INIT(irssi-python, test1, loafier@gmail.com) +AC_INIT(irssi-python, test2, loafier@gmail.com) AC_CONFIG_SRCDIR([src/pyconstants.c]) AC_CONFIG_HEADER([pyirssi-config.h]) -AM_INIT_AUTOMAKE([irssi-python], [test1]) +AM_INIT_AUTOMAKE([irssi-python], [test2]) AM_DISABLE_STATIC AM_PROG_LIBTOOL diff --git a/docs/irssi-python.html b/docs/irssi-python.html index 998a763..a28f381 100644 --- a/docs/irssi-python.html +++ b/docs/irssi-python.html @@ -17,7 +17,7 @@ Modules         -
_irssi
+
_irssi
sys

@@ -30,68 +30,68 @@
__builtin__.object
-
Ban -
Command -
Ignore -
IrssiBase +
Ban +
Command +
Ignore +
IrssiBase
-
Dcc +
Dcc
-
DccChat -
DccGet -
DccSend +
DccChat +
DccGet +
DccSend
-
IrssiChatBase +
IrssiChatBase
-
Chatnet -
Connect +
Chatnet +
Connect
-
IrcConnect +
IrcConnect
-
Nick -
Server +
Nick +
Server
-
IrcServer +
IrcServer
-
WindowItem +
WindowItem
-
Channel +
Channel
-
IrcChannel +
IrcChannel
-
Query +
Query
-
Log -
Logitem -
MainWindow -
Netsplit -
NetsplitChannel -
NetsplitServer -
Notifylist -
Process -
Rawlog -
Reconnect -
Script -
StatusbarItem -
TextDest -
Theme -
Window +
Log +
Logitem +
MainWindow +
Netsplit +
NetsplitChannel +
NetsplitServer +
Notifylist +
Process +
Rawlog +
Reconnect +
Script +
StatusbarItem +
TextDest +
Theme +
Window
@@ -117,16 +117,16 @@
+class Channel(WindowItem)
 
-class Channel(WindowItem)
    PyChannel objects
 
 
Method resolution order:
-
Channel
-
WindowItem
-
IrssiChatBase
-
IrssiBase
+
Channel
+
WindowItem
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -182,7 +182,7 @@ Data and other attributes defined here:
wholist = <attribute 'wholist' of 'irssi.Channel' objects>
/WHO list has been received

-Methods inherited from WindowItem:
+Methods inherited from WindowItem:
activity(...)
activity(data_level, hilight_color) -> None
change_server(...)
change_server(server) -> None
@@ -224,7 +224,7 @@ Set window item active
Return parent window for window item
-Data and other attributes inherited from WindowItem:
+Data and other attributes inherited from WindowItem:
createtime = <attribute 'createtime' of 'irssi.WindowItem' objects>
Time the witem was created
data_level = <attribute 'data_level' of 'irssi.WindowItem' objects>
0=no new data, 1=text, 2=msg, 3=highlighted text
@@ -236,7 +236,7 @@ Data and other attributes inherited from WindowI
server = <attribute 'server' of 'irssi.WindowItem' objects>
Active name for item

-Data and other attributes inherited from
IrssiChatBase:
+Data and other attributes inherited from IrssiChatBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
chat_type = <attribute 'chat_type' of 'irssi.IrssiChatBase' objects>
Chat name (str)
@@ -244,7 +244,7 @@ Data and other attributes inherited from Irss
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from
IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -255,15 +255,15 @@ Data and other attributes inherited from IrssiBas +class Chatnet(IrssiChatBase)
 
-class Chatnet(IrssiChatBase)
    PyChatnet objects
 
 
Method resolution order:
-
Chatnet
-
IrssiChatBase
-
IrssiBase
+
Chatnet
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -281,7 +281,7 @@ Data and other attributes defined here:
username = <attribute 'username' of 'irssi.Chatnet' objects>
if not empty, username preferred in this network

-Data and other attributes inherited from IrssiChatBase:
+Data and other attributes inherited from IrssiChatBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
chat_type = <attribute 'chat_type' of 'irssi.IrssiChatBase' objects>
Chat name (str)
@@ -289,7 +289,7 @@ Data and other attributes inherited from Irss
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from
IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -316,15 +316,15 @@ Data and other attributes inherited from IrssiBas +class Connect(IrssiChatBase)
 
-class Connect(IrssiChatBase)
    PyConnect objects
 
 
Method resolution order:
-
Connect
-
IrssiChatBase
-
IrssiBase
+
Connect
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -344,7 +344,7 @@ Data and other attributes defined here:
wanted_nick = <attribute 'wanted_nick' of 'irssi.Connect' objects>
Nick which we would prefer to use

-Data and other attributes inherited from IrssiChatBase:
+Data and other attributes inherited from IrssiChatBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
chat_type = <attribute 'chat_type' of 'irssi.IrssiChatBase' objects>
Chat name (str)
@@ -352,7 +352,7 @@ Data and other attributes inherited from Irss
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from
IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -363,14 +363,14 @@ Data and other attributes inherited from IrssiBas +class Dcc(IrssiBase)
 
-class Dcc(IrssiBase)
    PyDcc objects
 
 
Method resolution order:
-
Dcc
-
IrssiBase
+
Dcc
+
IrssiBase
__builtin__.object

@@ -416,7 +416,7 @@ Data and other attributes defined here:
transfd = <attribute 'transfd' of 'irssi.Dcc' objects>
Bytes transferred

-Data and other attributes inherited from IrssiBase:
+Data and other attributes inherited from IrssiBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
@@ -429,15 +429,15 @@ Data and other attributes inherited from IrssiBas +class DccChat(Dcc)
 
-class DccChat(Dcc)
    PyDccChat objects
 
 
Method resolution order:
-
DccChat
-
Dcc
-
IrssiBase
+
DccChat
+
Dcc
+
IrssiBase
__builtin__.object

@@ -455,7 +455,7 @@ Data and other attributes defined here:
mirc_ctcp = <attribute 'mirc_ctcp' of 'irssi.DccChat' objects>
Send CTCPs without the CTCP_MESSAGE prefix

-Methods inherited from Dcc:
+Methods inherited from Dcc:
close(...)
close() -> None
 
Close and destroy DCC connection.
@@ -469,7 +469,7 @@ Destroy DCC connection ?
-Data and other attributes inherited from Dcc:
+Data and other attributes inherited from Dcc:
addr = <attribute 'addr' of 'irssi.Dcc' objects>
Other side's IP address.
arg = <attribute 'arg' of 'irssi.Dcc' objects>
Given argument .. file name usually
@@ -497,7 +497,7 @@ Data and other attributes inherited from Dcc:
transfd = <attribute 'transfd' of 'irssi.Dcc' objects>
Bytes transferred

-Data and other attributes inherited from IrssiBase:
+Data and other attributes inherited from IrssiBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
@@ -510,15 +510,15 @@ Data and other attributes inherited from IrssiBas +class DccGet(Dcc)
 
-class DccGet(Dcc)
    PyDccGet objects
 
 
Method resolution order:
-
DccGet
-
Dcc
-
IrssiBase
+
DccGet
+
Dcc
+
IrssiBase
__builtin__.object

@@ -534,7 +534,7 @@ Data and other attributes defined here:
skipped = <attribute 'skipped' of 'irssi.DccGet' objects>
Bytes skipped from start (resuming file)

-Methods inherited from Dcc:
+Methods inherited from Dcc:
close(...)
close() -> None
 
Close and destroy DCC connection.
@@ -548,7 +548,7 @@ Destroy DCC connection ?
-Data and other attributes inherited from Dcc:
+Data and other attributes inherited from Dcc:
addr = <attribute 'addr' of 'irssi.Dcc' objects>
Other side's IP address.
arg = <attribute 'arg' of 'irssi.Dcc' objects>
Given argument .. file name usually
@@ -576,7 +576,7 @@ Data and other attributes inherited from Dcc:
transfd = <attribute 'transfd' of 'irssi.Dcc' objects>
Bytes transferred

-Data and other attributes inherited from IrssiBase:
+Data and other attributes inherited from IrssiBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
@@ -589,15 +589,15 @@ Data and other attributes inherited from IrssiBas +class DccSend(Dcc)
 
-class DccSend(Dcc)
    PyDccSend objects
 
 
Method resolution order:
-
DccSend
-
Dcc
-
IrssiBase
+
DccSend
+
Dcc
+
IrssiBase
__builtin__.object

@@ -613,7 +613,7 @@ Data and other attributes defined here:
waitforend = <attribute 'waitforend' of 'irssi.DccSend' objects>
File is sent, just wait for the replies from the other side

-Methods inherited from Dcc:
+Methods inherited from Dcc:
close(...)
close() -> None
 
Close and destroy DCC connection.
@@ -627,7 +627,7 @@ Destroy DCC connection ?
-Data and other attributes inherited from Dcc:
+Data and other attributes inherited from Dcc:
addr = <attribute 'addr' of 'irssi.Dcc' objects>
Other side's IP address.
arg = <attribute 'arg' of 'irssi.Dcc' objects>
Given argument .. file name usually
@@ -655,7 +655,7 @@ Data and other attributes inherited from Dcc:
transfd = <attribute 'transfd' of 'irssi.Dcc' objects>
Bytes transferred

-Data and other attributes inherited from IrssiBase:
+Data and other attributes inherited from IrssiBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
@@ -710,17 +710,17 @@ Data and other attributes defined here:
+class IrcChannel(Channel)
 
-class IrcChannel(Channel)
    PyIrcChannel objects
 
 
Method resolution order:
-
IrcChannel
-
Channel
-
WindowItem
-
IrssiChatBase
-
IrssiBase
+
IrcChannel
+
Channel
+
WindowItem
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -742,7 +742,7 @@ Remove a new ban from channel. Returns a list of bans in the channel.
-Methods inherited from Channel:
+Methods inherited from Channel:
nick_find(...)
nick_find(nick) -> Nick object or None
 
Find nick from nicklist.
@@ -764,7 +764,7 @@ Return a list of nicks in the channel.
-Data and other attributes inherited from Channel:
+Data and other attributes inherited from Channel:
chanop = <attribute 'chanop' of 'irssi.Channel' objects>
You are channel operator
joined = <attribute 'joined' of 'irssi.Channel' objects>
JOIN event for this channel has been received
@@ -794,7 +794,7 @@ Data and other attributes inherited from Channel
wholist = <attribute 'wholist' of 'irssi.Channel' objects>
/WHO list has been received
-Methods inherited from WindowItem:
+Methods inherited from WindowItem:
activity(...)
activity(data_level, hilight_color) -> None
change_server(...)
change_server(server) -> None
@@ -836,7 +836,7 @@ Set window item active
Return parent window for window item

-Data and other attributes inherited from WindowItem:
+Data and other attributes inherited from WindowItem:
createtime = <attribute 'createtime' of 'irssi.WindowItem' objects>
Time the witem was created
data_level = <attribute 'data_level' of 'irssi.WindowItem' objects>
0=no new data, 1=text, 2=msg, 3=highlighted text
@@ -848,7 +848,7 @@ Data and other attributes inherited from WindowI
server = <attribute 'server' of 'irssi.WindowItem' objects>
Active name for item

-Data and other attributes inherited from
IrssiChatBase:
+Data and other attributes inherited from IrssiChatBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
chat_type = <attribute 'chat_type' of 'irssi.IrssiChatBase' objects>
Chat name (str)
@@ -856,7 +856,7 @@ Data and other attributes inherited from Irss
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from
IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -867,16 +867,16 @@ Data and other attributes inherited from IrssiBas +class IrcConnect(Connect)
 
-class IrcConnect(Connect)
    PyIrcConnect objects
 
 
Method resolution order:
-
IrcConnect
-
Connect
-
IrssiChatBase
-
IrssiBase
+
IrcConnect
+
Connect
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -884,7 +884,7 @@ Data and other attributes defined here:
alternate_nick = <attribute 'alternate_nick' of 'irssi.IrcConnect' objects>
Alternate nick to use if default nick is taken

-Data and other attributes inherited from Connect:
+Data and other attributes inherited from Connect:
address = <attribute 'address' of 'irssi.Connect' objects>
Address where we connected (irc.blah.org)
chatnet = <attribute 'chatnet' of 'irssi.Connect' objects>
Chat network
@@ -900,7 +900,7 @@ Data and other attributes inherited from Connect
wanted_nick = <attribute 'wanted_nick' of 'irssi.Connect' objects>
Nick which we would prefer to use
-Data and other attributes inherited from IrssiChatBase:
+Data and other attributes inherited from IrssiChatBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
chat_type = <attribute 'chat_type' of 'irssi.IrssiChatBase' objects>
Chat name (str)
@@ -908,7 +908,7 @@ Data and other attributes inherited from Irss
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from
IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -919,16 +919,16 @@ Data and other attributes inherited from IrssiBas +class IrcServer(Server)
 
-class IrcServer(Server)
    PyIrcServer objects
 
 
Method resolution order:
-
IrcServer
-
Server
-
IrssiChatBase
-
IrssiBase
+
IrcServer
+
Server
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -1036,7 +1036,7 @@ Data and other attributes defined here:
usermode = <attribute 'usermode' of 'irssi.IrcServer' objects>
User mode in server

-Methods inherited from Server:
+Methods inherited from Server:
channel_find(...)
channel_find(name) -> Channel object or None
 
Find channel from this server
@@ -1135,7 +1135,7 @@ Find window with level Find window item that matches best to given arguments
-Data and other attributes inherited from Server:
+Data and other attributes inherited from Server:
away_reason = <attribute 'away_reason' of 'irssi.Server' objects>
Away reason message
banned = <attribute 'banned' of 'irssi.Server' objects>
Were we banned from this server? 1|0
@@ -1167,7 +1167,7 @@ Data and other attributes inherited from Server:
version = <attribute 'version' of 'irssi.Server' objects>
Server version

-Data and other attributes inherited from IrssiChatBase:
+Data and other attributes inherited from IrssiChatBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
chat_type = <attribute 'chat_type' of 'irssi.IrssiChatBase' objects>
Chat name (str)
@@ -1175,7 +1175,7 @@ Data and other attributes inherited from Irss
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from
IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -1204,14 +1204,14 @@ Data and other attributes inherited from IrssiBas +class IrssiChatBase(IrssiBase)
 
-class IrssiChatBase(IrssiBase)
    PyIrssiChatBase objects
 
 
Method resolution order:
-
IrssiChatBase
-
IrssiBase
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -1223,7 +1223,7 @@ Data and other attributes defined here:
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -1416,15 +1416,15 @@ Data and other attributes defined here:
+class Nick(IrssiChatBase)
 
-class Nick(IrssiChatBase)
    PyNick objects
 
 
Method resolution order:
-
Nick
-
IrssiChatBase
-
IrssiBase
+
Nick
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -1452,7 +1452,7 @@ Data and other attributes defined here:
voice = <attribute 'voice' of 'irssi.Nick' objects>
User status

-Data and other attributes inherited from IrssiChatBase:
+Data and other attributes inherited from IrssiChatBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
chat_type = <attribute 'chat_type' of 'irssi.IrssiChatBase' objects>
Chat name (str)
@@ -1460,7 +1460,7 @@ Data and other attributes inherited from Irss
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from
IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -1529,16 +1529,16 @@ Data and other attributes defined here:
+class Query(WindowItem)
 
-class Query(WindowItem)
    PyQuery objects
 
 
Method resolution order:
-
Query
-
WindowItem
-
IrssiChatBase
-
IrssiBase
+
Query
+
WindowItem
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -1556,7 +1556,7 @@ Data and other attributes defined here:
unwanted = <attribute 'unwanted' of 'irssi.Query' objects>
1 if the other side closed or some error occured (DCC chats)

-Methods inherited from WindowItem:
+Methods inherited from WindowItem:
activity(...)
activity(data_level, hilight_color) -> None
command(...)
command(cmd) -> None
@@ -1594,7 +1594,7 @@ Set window item active
Return parent window for window item
-Data and other attributes inherited from WindowItem:
+Data and other attributes inherited from WindowItem:
createtime = <attribute 'createtime' of 'irssi.WindowItem' objects>
Time the witem was created
data_level = <attribute 'data_level' of 'irssi.WindowItem' objects>
0=no new data, 1=text, 2=msg, 3=highlighted text
@@ -1606,7 +1606,7 @@ Data and other attributes inherited from WindowI
server = <attribute 'server' of 'irssi.WindowItem' objects>
Active name for item

-Data and other attributes inherited from
IrssiChatBase:
+Data and other attributes inherited from IrssiChatBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
chat_type = <attribute 'chat_type' of 'irssi.IrssiChatBase' objects>
Chat name (str)
@@ -1614,7 +1614,7 @@ Data and other attributes inherited from Irss
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from
IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -1800,15 +1800,15 @@ Data and other attributes defined here:
+class Server(IrssiChatBase)
 
-class Server(IrssiChatBase)
    PyServer objects
 
 
Method resolution order:
-
Server
-
IrssiChatBase
-
IrssiBase
+
Server
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -1943,7 +1943,7 @@ Data and other attributes defined here:
version = <attribute 'version' of 'irssi.Server' objects>
Server version

-Data and other attributes inherited from IrssiChatBase:
+Data and other attributes inherited from IrssiChatBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
chat_type = <attribute 'chat_type' of 'irssi.IrssiChatBase' objects>
Chat name (str)
@@ -1951,7 +1951,7 @@ Data and other attributes inherited from Irss
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from
IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -2160,15 +2160,15 @@ Data and other attributes defined here:
+class WindowItem(IrssiChatBase)
 
-class WindowItem(IrssiChatBase)
    PyWindowItem objects
 
 
Method resolution order:
-
WindowItem
-
IrssiChatBase
-
IrssiBase
+
WindowItem
+
IrssiChatBase
+
IrssiBase
__builtin__.object

@@ -2226,7 +2226,7 @@ Data and other attributes defined here:
server = <attribute 'server' of 'irssi.WindowItem' objects>
Active name for item

-Data and other attributes inherited from IrssiChatBase:
+Data and other attributes inherited from IrssiChatBase:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
chat_type = <attribute 'chat_type' of 'irssi.IrssiChatBase' objects>
Chat name (str)
@@ -2234,7 +2234,7 @@ Data and other attributes inherited from Irss
chat_type_id = <attribute 'chat_type_id' of 'irssi.IrssiChatBase' objects>
Chat Type id (int)

-Data and other attributes inherited from
IrssiBase:
+Data and other attributes inherited from IrssiBase:
type = <attribute 'type' of 'irssi.IrssiBase' objects>
Irssi's name for object
type_id = <attribute 'type_id' of 'irssi.IrssiBase' objects>
Irssi's type id for object
@@ -2591,4 +2591,4 @@ Return refnum for last window. SIGNAL_PRIORITY_DEFAULT = 0
SIGNAL_PRIORITY_HIGH = -100
SIGNAL_PRIORITY_LOW = 100
- \ No newline at end of file + diff --git a/src/Makefile.am b/src/Makefile.am index 5a28039..d5356a7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,16 +1,16 @@ moduledir = $(libdir)/irssi/modules wrappersdir = $(datadir)/irssi/scripts -module_LTLIBRARIES = libirssi_python.la +module_LTLIBRARIES = libpython.la -libirssi_python_la_DEPENDENCIES = objects/libobjects.la -libirssi_python_la_LIBADD = $(PYTHON_LDFLAGS) objects/libobjects.la -libirssi_python_la_LDFLAGS = -avoid-version +libpython_la_DEPENDENCIES = objects/libobjects.la +libpython_la_LIBADD = $(PYTHON_LDFLAGS) objects/libobjects.la +libpython_la_LDFLAGS = -avoid-version INCLUDES = $(IRSSI_PYTHON_INCLUDES) \ -I$(top_srcdir)/src/objects \ -DSCRIPTDIR=\""$(datadir)/irssi/scripts"\" -libirssi_python_la_SOURCES = \ +libpython_la_SOURCES = \ pycore.c \ pyutils.c \ pymodule.c \ diff --git a/src/pycore.c b/src/pycore.c index f367e5f..0003392 100644 --- a/src/pycore.c +++ b/src/pycore.c @@ -32,7 +32,14 @@ #include "pyconstants.h" #include "factory.h" -/*XXX: copy parse into utils */ +static void cmd_default(const char *data, SERVER_REC *server, void *item) +{ + if (!*data) + data = "list"; + + command_runsub("py", data, server, item); +} + static void cmd_exec(const char *data) { PyObject *co; @@ -136,7 +143,7 @@ static void intr_catch(int sig) } #endif -void irssi_python_init(void) +void python_init(void) { Py_InitializeEx(0); @@ -156,21 +163,23 @@ void irssi_python_init(void) "import irssi_startup\n" ); - //assert(signal(SIGINT, intr_catch) != SIG_ERR); + /* assert(signal(SIGINT, intr_catch) != SIG_ERR); */ - command_bind("pyload", NULL, (SIGNAL_FUNC) cmd_load); - command_bind("pyunload", NULL, (SIGNAL_FUNC) cmd_unload); - command_bind("pylist", NULL, (SIGNAL_FUNC) cmd_list); - command_bind("pyexec", NULL, (SIGNAL_FUNC) cmd_exec); + command_bind("py", NULL, (SIGNAL_FUNC) cmd_default); + command_bind("py load", NULL, (SIGNAL_FUNC) cmd_load); + command_bind("py unload", NULL, (SIGNAL_FUNC) cmd_unload); + command_bind("py list", NULL, (SIGNAL_FUNC) cmd_list); + command_bind("py exec", NULL, (SIGNAL_FUNC) cmd_exec); module_register(MODULE_NAME, "core"); } -void irssi_python_deinit(void) +void python_deinit(void) { - command_unbind("pyload", (SIGNAL_FUNC) cmd_load); - command_unbind("pyunload", (SIGNAL_FUNC) cmd_unload); - command_unbind("pylist", (SIGNAL_FUNC) cmd_list); - command_unbind("pyexec", (SIGNAL_FUNC) cmd_exec); + command_unbind("py", (SIGNAL_FUNC) cmd_default); + command_unbind("py load", (SIGNAL_FUNC) cmd_load); + command_unbind("py unload", (SIGNAL_FUNC) cmd_unload); + command_unbind("py list", (SIGNAL_FUNC) cmd_list); + command_unbind("py exec", (SIGNAL_FUNC) cmd_exec); pymodule_deinit(); pyloader_deinit(); diff --git a/src/pycore.h b/src/pycore.h index ae51924..f3f1c36 100644 --- a/src/pycore.h +++ b/src/pycore.h @@ -1,7 +1,7 @@ #ifndef _PYCORE_H #define _PYCORE_H -void irssi_python_init(void); -void irssi_python_deinit(void); +void python_init(void); +void python_deinit(void); #endif diff --git a/src/pyirssi.h b/src/pyirssi.h index 3fc4223..1db4dfd 100644 --- a/src/pyirssi.h +++ b/src/pyirssi.h @@ -1,7 +1,7 @@ #ifndef _PYIRSSI_H_ #define _PYIRSSI_H_ -#define MODULE_NAME "irssi_python" +#define MODULE_NAME "python" #include "config.h" #include "core.h" #include "common.h" -- cgit