diff options
| author | jason | 2012-07-21 05:39:25 -0600 |
|---|---|---|
| committer | jason | 2012-07-21 05:39:25 -0600 |
| commit | f28ee04f142db3192027ca99ea5d86705ce14d7f (patch) | |
| tree | fcd60a68f8f8398288b720222489e4969c29ed71 | |
| parent | 44176ad5d8c959245bf114007d35e00c1909a196 (diff) | |
| download | warmachine-f28ee04f142db3192027ca99ea5d86705ce14d7f.tar.gz warmachine-f28ee04f142db3192027ca99ea5d86705ce14d7f.zip | |
Changed the main loop to the call function of the object.
| -rwxr-xr-x | warmachine.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/warmachine.py b/warmachine.py index 148ad65..a8cac68 100755 --- a/warmachine.py +++ b/warmachine.py | |||
| @@ -52,7 +52,7 @@ class IRC(object): | |||
| 52 | """ | 52 | """ |
| 53 | self.irc.send(command + '\r\n') | 53 | self.irc.send(command + '\r\n') |
| 54 | 54 | ||
| 55 | def MainLoop(self): | 55 | def __call__(self, *args, **kwargs): |
| 56 | """ | 56 | """ |
| 57 | Main Event Loop that parses generic commands | 57 | Main Event Loop that parses generic commands |
| 58 | """ | 58 | """ |
| @@ -93,8 +93,8 @@ class IRC(object): | |||
| 93 | 93 | ||
| 94 | if __name__ == '__main__': | 94 | if __name__ == '__main__': |
| 95 | import settings | 95 | import settings |
| 96 | i = IRC(settings.SERVER, settings.NICKNAME, settings.IDENT) | 96 | i = IRC(settings.SERVER, settings.NICKNAME, settings.IDENT, settings.PORT) |
| 97 | i.connect() | 97 | i.connect() |
| 98 | for channel in settings.CHANNELS: | 98 | for channel in settings.CHANNELS: |
| 99 | i.join(channel) | 99 | i.join(channel) |
| 100 | i.MainLoop() | 100 | i() |