CTCP Version reply

This commit is contained in:
Kiooeht 2011-05-26 00:40:30 -07:00
parent 8f8dcb0012
commit 3e8bfcf3cb
5 changed files with 24 additions and 1 deletions

View file

@ -33,6 +33,7 @@ CHANGELOG
* Check Pyqt4 and pygame are installed and correct versions - Kiooeht [evacipatedBox]
* Advanced Mode: View memo (channel) modes - Kiooeht [evacipatedBox]
* Quirk groups - Kiooeht [evacipatedBox]
* CTCP Version reply - Kiooeht [evacipatedBox]
* Bug fixes
* Logviewer updates - Kiooeht [evacipatedBox]
* Memo scrollbar thing - Kiooeht [evacipatedBox]

5
irc.py
View file

@ -8,6 +8,7 @@ import socket
from dataobjs import Mood, PesterProfile
from generic import PesterList
from version import _pcVersion
logging.basicConfig(level=logging.INFO)
@ -271,6 +272,10 @@ class PesterHandler(DefaultCommandHandler):
return
# silently ignore CTCP
if msg[0] == '\x01':
handle = nick[0:nick.find("!")]
logging.info("---> recv \"CTCP %s :%s\"" % (handle, msg[1:-1]))
if msg[1:-1] == "VERSION":
helpers.notice(self.parent.cli, handle, "\x01VERSION Pesterchum %s\x01" % (_pcVersion))
return
handle = nick[0:nick.find("!")]
logging.info("---> recv \"PRIVMSG %s :%s\"" % (handle, msg))

View file

@ -5,6 +5,7 @@ from os import remove
from generic import RightClickList, RightClickTree, MultiTextDialog
from dataobjs import pesterQuirk, PesterProfile
from memos import TimeSlider, TimeInput
from version import _pcVersion
class PesterQuirkItem(QtGui.QTreeWidgetItem):
def __init__(self, quirk):
@ -1234,7 +1235,7 @@ class AboutPesterchum(QtGui.QDialog):
self.mainwindow = parent
self.setStyleSheet(self.mainwindow.theme["main/defaultwindow/style"])
self.title = QtGui.QLabel("P3ST3RCHUM V. 3.14.2")
self.title = QtGui.QLabel("P3ST3RCHUM V. %s" % (_pcVersion))
self.credits = QtGui.QLabel("Programming by:\n\
illuminatedwax (ghostDunk)\n\
Kiooeht (evacipatedBox)\n\

View file

@ -1,4 +1,6 @@
# pesterchum
import version
version.pcVerCalc()
import logging
import os, sys, getopt
import os.path

14
version.py Normal file
View file

@ -0,0 +1,14 @@
import urllib
_pcMajor = "3.14"
_pcMinor = "2"
_pcStatus = "1" # 0 = alpha
# 1 = beta
# 2 = release candidate
# 3 = public release
_pcRevision = "3"
_pcVersion = ""
def pcVerCalc():
global _pcVersion
_pcVersion = "%s.%s.%s-%s" % (_pcMajor, _pcMinor, _pcStatus, _pcRevision)