import net.rizon.acid.events.EventServerNotice;
import net.rizon.acid.events.EventSync;
import net.rizon.acid.events.EventUserConnect;
+import net.rizon.acid.events.EventUserIntroduce;
import net.rizon.acid.events.EventWebIRC;
import net.rizon.acid.events.ExceptionHandler;
import net.rizon.acid.logging.LoggerUtils;
Protocol.eob();
}
- public static void onNick(User user)
+ public static void onNick(User user, boolean isBursting)
{
- EventUserConnect event = new EventUserConnect();
- event.setUser(user);
- eventBus.post(event);
+ // Always fire this event
+ EventUserIntroduce eui = new EventUserIntroduce(user);
+ eventBus.post(eui);
+
+ if (!isBursting)
+ {
+ // Only fire when not bursting
+ EventUserConnect event = new EventUserConnect();
+ event.setUser(user);
+ eventBus.post(event);
+ }
}
public static void onNickChange(User user, String oldnick)
--- /dev/null
+package net.rizon.acid.events;
+
+import net.rizon.acid.core.User;
+
+/**
+ * Event used when a user is introduced to the network. This can be either from
+ * a connect or after a burst.
+ *
+ * @author orillion <orillion@rizon.net>
+ */
+public class EventUserIntroduce
+{
+ private final User user;
+
+ public EventUserIntroduce(User user)
+ {
+ this.user = user;
+ }
+
+ public User getUser()
+ {
+ return user;
+ }
+}
{
User user = new User(params[0], params[4], params[9], params[5], params[10], source, Integer.parseInt(params[2]), Integer.parseInt(params[2]), params[3], params[7], params[6]);
UserList.increaseHost(params[6]);
- if (source.isBursting() == false)
- Acidictive.onNick(user);
+
+ Acidictive.onNick(user, source.isBursting());
}
-}
\ No newline at end of file
+}