Skip to content

Commit

Permalink
SSL 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
gangwon authored and sim0629 committed Oct 8, 2013
1 parent c2a33fa commit b0a0113
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import irc.bot
import irc.client
import irc.connection

import ssl
import pymongo
import datetime

Expand All @@ -12,10 +14,12 @@

class SBot(irc.bot.SingleServerIRCBot):
def __init__(self):
factory = irc.connection.Factory(wrapper=ssl.wrap_socket)
irc.bot.SingleServerIRCBot.__init__(self,
[(config.SERVER, config.PORT), ],
config.BOT_NAME,
'm',
connect_factory = factory
)
self.connected = False

Expand Down
2 changes: 1 addition & 1 deletion config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NOTIFY_NAME = '!'

# IRC
SERVER = 'irc.uriirc.org'
PORT = 16667
PORT = 16662
BOT_NAME = 's'
OPERATOR_NAME = 'sgm'
OPERATOR_COMMAND = '!옵'
Expand Down

0 comments on commit b0a0113

Please sign in to comment.