Changeset daec89e4c32c683674720ab458902654528a5f47
- Timestamp:
- 08/11/08 11:05:23
(3 months ago)
- Author:
- Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
- git-committer:
- Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1218438323 +0200
- git-parent:
[0bcb22bf7f4574a9697dddbacc0a23dae618b5a0]
- git-author:
- Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 1218438018 +0200
- Message:
rfc2812: handle ERR_NOSUCHNICK and ERR_NOSUCHCHANNEL
Delete the corresponding user/channel from the server list (if present),
and notify the client about the error.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r0bcb22b |
rdaec89e |
|
| 982 | 982 | # ==server events currently supported: |
|---|
| 983 | 983 | # |
|---|
| 984 | | # TODO handle errors ERR_NOSUCHNICK, ERR_NOSUCHCHANNEL |
|---|
| 985 | 984 | # TODO handle errors ERR_CHANOPRIVSNEEDED, ERR_CANNOTSENDTOCHAN |
|---|
| 986 | 985 | # |
|---|
| … | … | |
| 1352 | 1351 | @server.channel(data[:channel]).url=data[:url].dup |
|---|
| 1353 | 1352 | handle(:channel_url, data) |
|---|
| | 1353 | when ERR_NOSUCHNICK |
|---|
| | 1354 | data[:nick] = argv[1] |
|---|
| | 1355 | if user = @server.get_user(data[:nick]) |
|---|
| | 1356 | @server.delete_user(user) |
|---|
| | 1357 | end |
|---|
| | 1358 | handle(:nosuchnick, data) |
|---|
| | 1359 | when ERR_NOSUCHCHANNEL |
|---|
| | 1360 | data[:channel] = argv[1] |
|---|
| | 1361 | if channel = @server.get_channel(data[:channel]) |
|---|
| | 1362 | @server.delete_channel(channel) |
|---|
| | 1363 | end |
|---|
| | 1364 | handle(:nosuchchannel, data) |
|---|
| 1354 | 1365 | else |
|---|
| 1355 | 1366 | warning "Unknown message #{serverstring.inspect}" |
|---|