e.onChanModes(creator, chan, modes);
}
+ public static void onWebIRC(Server source, String operation, String uid, String realhost, String sockhost, String webircPassword, String webircUsername, String fakeHost, String fakeIp)
+ {
+ for (Event e : Event.getEvents())
+ e.onWebIRC(source, operation, uid, realhost, sockhost, webircPassword, webircUsername, fakeHost, fakeIp);
+ }
+
public static void setMode(String source, String target, String modes)
{
Channel c = Channel.findChannel(target);
public void onUserMode(User user, String oldmodes, String newmodes) { }
public void onChanModes(String prefix, Channel chan, String modes) { }
+ public void onWebIRC(Server source, String operation, String uid, String realhost, String sockhost, String webircPassword, String webircUsername, String fakeHost, String fakeIp) { };
public void onRehash() throws Exception { }
{
encap(target.getServer().getName(), "CHGCLASS", target.getUID() + " " + clazz);
}
+
+ public static void chgrealhost(User target, String sockhost, String realhost)
+ {
+ encap(target.getServer().getName(), "CHGREALHOST", target.getUID() + " " + sockhost + " " + realhost);
+ }
+
+ public static void swebirc(String flag, String uid, String host, String ip, String password, String name, String fakeSockHost, String fakeHost, String ... args)
+ {
+ if (flag.equalsIgnoreCase("REQ") || flag.equalsIgnoreCase("ACK") || flag.equalsIgnoreCase("NAK"))
+ {
+ encap("*", "SWEBIRC", flag.toUpperCase() + " " + uid + " " + host + " " + ip + " * * " + password + " " + name + " " + fakeSockHost + " :" + fakeHost);
+ }
+ }
}
return s;
}
+ public void setRealhost(String ip, String host)
+ {
+ this.ip = ip;
+ this.host = host;
+ }
+
public void setFlags(String flags)
{
this.flags = flags;
package net.rizon.acid.messages;
+import java.util.ArrayList;
+import java.util.List;
import net.rizon.acid.core.AcidCore;
+import net.rizon.acid.core.Acidictive;
import net.rizon.acid.core.Message;
import net.rizon.acid.core.Server;
import net.rizon.acid.core.User;
user.setAuthFlags(params[3]);
}
+ else if (params[1].equals("SWEBIRC"))
+ {
+ int parc = params.length;
+ if (parc < 10)
+ return;
+
+ Acidictive.onWebIRC(source,
+ params[2], // operation
+ params[3], // uid
+ params[4], // realhost
+ params[5], // sockhost
+ params[parc - 4], // webirc password
+ params[parc - 3], // webirc username
+ params[parc - 2], // requested host
+ params[parc - 1] // requested ip
+ );
+ }
+ else if (params[1].equals("CHGREALHOST"))
+ {
+ User user = User.findUser(params[2]);
+ if (user == null)
+ return;
+
+ user.setRealhost(params[3], params[4]);
+ }
}
}
\ No newline at end of file