ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/client/alerters/IRC__Alerter.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/alerters/IRC__Alerter.java (file contents):
Revision 1.12 by tdb, Sun Mar 4 05:37:15 2001 UTC vs.
Revision 1.15 by ajm, Mon Mar 5 12:45:51 2001 UTC

# Line 63 | Line 63 | public class IRC__Alerter implements PluginAlerter {
63              String levelName = cp.getProperty(_name, "Alerter.IRC.level");
64              int level = StringUtils.getStringPos(levelName, Alert.alertLevels);
65              // only send if it's equal (or above) our level
66 <            if(alert.getLevel() >= level) {
66 >            if(((alert.getLevel() == 0) && (alert.getLastLevel() >= level)) || (alert.getLevel() >= level)) {
67                  String alertType = Alert.alertLevels[alert.getLevel()];
68                  String thresholdType = Alert.thresholdLevels[alert.getThreshold()];
69                  // sort out the message
# Line 255 | Line 255 | public class IRC__Alerter implements PluginAlerter {
255           */
256          public void sendMsg(String msg) {
257              _socketOut.println("PRIVMSG "+_channel+" :"+msg);
258 +            // wait a second before returning...
259 +            // this ensures messages can't be sent too fast
260 +            try {Thread.sleep(1000);} catch (InterruptedException e) {}
261          }
262          
263          /**
# Line 265 | Line 268 | public class IRC__Alerter implements PluginAlerter {
268           */
269          public void sendPrivMsg(String user, String msg) {
270              _socketOut.println("PRIVMSG "+user+" :"+msg);
271 +            // wait a second before returning...
272 +            // this ensures messages can't be sent too fast
273 +            try {Thread.sleep(1000);} catch (InterruptedException e) {}
274          }
275          
276          /**
# Line 275 | Line 281 | public class IRC__Alerter implements PluginAlerter {
281          public void sendAction(String msg) {
282              char esc = 001;
283              sendMsg(esc+"ACTION "+msg+esc);
284 +            // wait a second before returning...
285 +            // this ensures messages can't be sent too fast
286 +            try {Thread.sleep(1000);} catch (InterruptedException e) {}
287          }
288          
289          /**
# Line 284 | Line 293 | public class IRC__Alerter implements PluginAlerter {
293           */
294          public void sendNotice(String msg) {
295              _socketOut.println("NOTICE "+_channel+" :"+msg);
296 +            // wait a second before returning...
297 +            // this ensures messages can't be sent too fast
298 +            try {Thread.sleep(1000);} catch (InterruptedException e) {}
299          }
300          
301          /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines