Package ecks.services

Examples of ecks.services.SrvChannel


        return Desc;
    }

    public void handle_command(Service who, String user, String replyto, String arguments) {
        // todo: make this check channel for any 'protected' metadata
        SrvChannel temp = ((SrvChannel) who);
        String args[] = arguments.split(" ");
        String tU = args[0].toLowerCase();
        if (args.length == 1) {
            if (temp.getChannels().containsKey(tU)) {
                temp.getChannels().remove(tU); // drop the channel
                Generic.srvPart(who, tU, "Channel Unregistered.");
                Logging.info("SRVCHAN", "Channel " + tU + " unregistered by " + user + ".");
                Generic.curProtocol.outPRVMSG(who, replyto, "Channel removed.");
            } else Generic.curProtocol.outPRVMSG(who, replyto, "\u0002Error:\u0002 No such channel is registered");
        } else
View Full Code Here


    public CommandDesc getDesc() {
        return Desc;
    }

    public void handle_command(Service who, String user, String replyto, String arguments) {
        SrvChannel temp = ((SrvChannel) who);
        String args[] = arguments.split(" ");
        if (args.length == 2) {
            if (Generic.Users.containsKey(args[1].toLowerCase())) {
                if (Generic.Users.get(args[1].toLowerCase()).authhandle != null) {
                    String u = Generic.Users.get(args[1].toLowerCase()).authhandle;
                    String ch = args[0].toLowerCase();
                    if (!temp.getChannels().containsKey(ch)) {
                        temp.getChannels().put(ch, new SrvChannel_channel(ch, u));
                        temp.getChannels().get(ch).getUsers().put(u, SrvChannel_channel.ChanAccess.C_OWNER);
                        ((SrvAuth) Configuration.getSvc().get(Configuration.authservice)).getUsers().get(u).WhereAccess.put(ch, SrvChannel_channel.ChanAccess.C_OWNER.toString());
                        temp.getChannels().get(ch).setMeta("_registered-by", Generic.Users.get(user.toLowerCase()).authhandle);
                        temp.getChannels().get(ch).setMeta("_ts_registered", util.getTS());
                        temp.getChannels().get(ch).setMeta("_ts_last", util.getTS());
                        Generic.curProtocol.outPRVMSG(who, replyto, "\u0002" + Generic.Users.get(user).uid + ":\u0002 Registration Succeeded!");
                        Logging.info("SRVCHAN", "Channel " + ch + " registered by " + user + " to " + u + ".");
                        Generic.curProtocol.srvJoin(who, ch, "+strn");
                        Generic.curProtocol.outSETMODE(who, ch, "+ro", who.getname());
View Full Code Here

TOP

Related Classes of ecks.services.SrvChannel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.