Changeset 56178 in webkit


Ignore:
Timestamp:
Mar 18, 2010 11:56:57 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-18 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Support using IRC accounts with a password
https://bugs.webkit.org/show_bug.cgi?id=36287

Add a global option to specify an IRC password so we can use the
sheriffbot account (which needs a password).

  • Scripts/webkitpy/irc/ircbot.py:
  • Scripts/webkitpy/irc/ircproxy.py:
  • Scripts/webkitpy/patch/patcher.py:
Location:
trunk/WebKitTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r56176 r56178  
     12010-03-18  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Support using IRC accounts with a password
     6        https://bugs.webkit.org/show_bug.cgi?id=36287
     7
     8        Add a global option to specify an IRC password so we can use the
     9        sheriffbot account (which needs a password).
     10
     11        * Scripts/webkitpy/irc/ircbot.py:
     12        * Scripts/webkitpy/irc/ircproxy.py:
     13        * Scripts/webkitpy/patch/patcher.py:
     14
    1152010-03-18  Eric Seidel  <eric@webkit.org>
    216
  • trunk/WebKitTools/Scripts/webkitpy/irc/ircbot.py

    r56125 r56178  
    3737                 server="irc.freenode.net",
    3838                 port=6667,
    39                  nickname="webkit-smokey",
    40                  channel="#webkit-test"):
     39                 nickname="sheriffbot",
     40                 password=None, # sheriffbot actually needs a password.
     41                 channel="#webkit"):
    4142        self._message_queue = message_queue
    42         ircbot.SingleServerIRCBot.__init__(self, [(server, port)], nickname, nickname)
     43        ircbot.SingleServerIRCBot.__init__(self, [(server, port, password)], nickname, nickname)
    4344        self._channel = channel
    4445
  • trunk/WebKitTools/Scripts/webkitpy/irc/ircproxy.py

    r56125 r56178  
    3333
    3434class _IRCThread(threading.Thread):
    35     def __init__(self, message_queue, bot_class):
     35    def __init__(self, message_queue, bot_class, password):
    3636        threading.Thread.__init__(self)
    3737        self.setDaemon(True)
    3838        self._message_queue = message_queue
    3939        self._bot_class = bot_class
     40        self._password = password
    4041
    4142    def run(self):
    42         bot = self._bot_class(self._message_queue)
     43        bot = self._bot_class(self._message_queue, password=self._password)
    4344        bot.start()
    4445
    4546
    4647class IRCProxy(object):
    47     def __init__(self, bot_class=IRCBot):
     48    def __init__(self, bot_class=IRCBot, password=None):
    4849        self._message_queue = ThreadedMessageQueue()
    49         self._child_thread = _IRCThread(self._message_queue, bot_class)
     50        self._child_thread = _IRCThread(self._message_queue, bot_class, password=password)
    5051        self._child_thread.start()
    5152
  • trunk/WebKitTools/Scripts/webkitpy/patch/patcher.py

    r56137 r56178  
    5252        make_option("--dry-run", action="store_true", dest="dry_run", default=False, help="do not touch remote servers"),
    5353        make_option("--status-host", action="store", dest="status_host", type="string", nargs=1, help="Hostname (e.g. localhost or commit.webkit.org) where status updates should be posted."),
     54        make_option("--irc-password", action="store", dest="irc_password", type="string", nargs=1, help="Password to use when communicating via IRC."),
    5455    ]
    5556
     
    9899        if options.status_host:
    99100            self.status_server.set_host(options.status_host)
     101        if options.irc_password:
     102            self._irc_password = options.irc_password
    100103
    101104    def should_execute_command(self, command):
Note: See TracChangeset for help on using the changeset viewer.