Author Topic: IceChat FisH  (Read 5799 times)

Askerion

  • Newbie
  • *
  • Posts: 19
Re: IceChat FisH
« Reply #15 on: November 23, 2014, 11:43:43 PM »
Good Morning,

I have done one channel message is decrypted as and also when I send a text he is sent encrypted.

Now I have the problem that is if I my input text Send Encrypts the ship, but also encrypted in my chat window. He should, however, be shown normally.

So the question is: How can I send my encrypted text, but themselves get it displayed normally.

Here is my code:

Code: [Select]
public override PluginArgs InputText(PluginArgs args)
        {
            if (args.Command.StartsWith("/setkey"))
            {

                BlowfishKeys frm = new BlowfishKeys(BlowfistuffemFile);               
                frm.Show();
            }



            foreach (Blowfistuffem item in IceChatBlowfistuffem.listBlowfishs)
            {
                if (item.Enable = true)
                {
                    BlowfishEnabled = true;
                    if (item.ChannelName == args.Channel)
                    {
                        String cryptedmessage = MessageEncrypt(args.Command, item.ChannelKey);
                        args.Command = args.Command.Replace(args.Command, cryptedmessage);
                        return args;
                    }
                }

            }





            return args;
        }


the source code is misrepresented.

Therefore, here's an external link

http://pastebin.com/wzqtsYLY
« Last Edit: November 23, 2014, 11:51:21 PM by Askerion »

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: IceChat FisH
« Reply #16 on: November 24, 2014, 09:28:11 AM »
I am not sure, you probably have to send the PRIVMSG command inside the plugin with the encrypted message, and then perhaps send back a /echo command or such, to echo to your window.

args.Channel gives you the channel name if you are in a channel
args.Nick gives you the Nickname if you are in a Query

args.Extra will equal "Channel" or "Query" if you are in a channel or a query.

To send a command in the plugin, create a new PluginArgs variable with a command value.
Code: [Select]
PluginArgs argsC = new PluginArgs();
argsC.Command = "/some command to send";
OnCommand(argsC);
See how that works for you. If not we may need to make a adjustment to IceChat to allow for this to work better.



The IceChat God

Askerion

  • Newbie
  • *
  • Posts: 19
Re: IceChat FisH
« Reply #17 on: November 24, 2014, 11:36:12 AM »
OK maybe I expressed myself wrong, or I do not understand it yet known,
Which Function is responsible for the outgoing text.

(Public override PluginArgs input text (PluginArgs args) ??? or is there another way
(If I for example, want to encrypt an outgoing message and args.message debug is empty and this is my written only in args.command)


My problem is that my message is indeed sent encrypted. and the other user can decrypt my message, but I personally do not see the plain text but also the encrypted message.,
« Last Edit: November 24, 2014, 11:43:41 AM by Askerion »

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: IceChat FisH
« Reply #18 on: November 24, 2014, 11:44:46 AM »
PluginArgs argsC = new PluginArgs();
argsC.Command = "/some command to send";
OnCommand(argsC);

That is how you send a command. If you want to send a raw message, like PRIVMSG

argsC.command = "/raw PRIVMSG #channel: encrypted message here";

Then change args.Command to /echo the normal message to your window.
The IceChat God

Askerion

  • Newbie
  • *
  • Posts: 19
Re: IceChat FisH
« Reply #19 on: November 24, 2014, 12:10:36 PM »
But there is no way to transmit the encrypted message to the IRC and display text in IceChat Channel window Plain?

I will tomorrow at work on trying to solve the problem. I'm not a developer and am still learning:-)

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: IceChat FisH
« Reply #20 on: November 24, 2014, 12:35:32 PM »
Yes, there is, I explained how to do it.
You just have to change the way IceChat handles the message/command or it will duplicate it.
The IceChat God

Askerion

  • Newbie
  • *
  • Posts: 19
Re: IceChat FisH
« Reply #21 on: November 24, 2014, 10:20:34 PM »
Good Morning,

Unfortunately, I do not quite understand how to use it.

Currently I have to test that. But Ends in a Loop


Code: [Select]
public override PluginArgs InputText(PluginArgs args)
        {
            if (args.Command.StartsWith("/setkey"))
            {

                BlowfishKeys frm = new BlowfishKeys(BlowfistuffemFile);               
                frm.Show();
            }



           


            foreach (Blowfistuffem item in IceChatBlowfistuffem.listBlowfishs)
            {
                if (item.Enable = true)
                {
                    BlowfishEnabled = true;
                    if (item.ChannelName == args.Channel)
                    {
                        String cryptedmessage = MessageEncrypt(args.Command, item.ChannelKey);                     
                        args.Command = args.Command.Replace(args.Command, cryptedmessage);

                        test();
                        return args;

                    }
                }

            }
            return args;
        }

        public void test()
        {
            PluginArgs argsC = new PluginArgs();
            argsC.Command = "/echo halloa asasas";
            OnCommand(argsC);
        }

Askerion

  • Newbie
  • *
  • Posts: 19
Re: IceChat FisH
« Reply #22 on: November 25, 2014, 10:50:29 AM »
Hello, I have got it so far but he still sends my / raw command and my input text. how can my input text Show only with me and not send to irc?

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: IceChat FisH
« Reply #23 on: November 25, 2014, 01:14:21 PM »
Make args.Command blank when you return it.

Your code above will not work though.

Might be better to send along a link to your plugin, could have a look at it.
« Last Edit: November 25, 2014, 09:08:43 PM by Snerf »
The IceChat God

Askerion

  • Newbie
  • *
  • Posts: 19
Re: IceChat FisH
« Reply #24 on: November 26, 2014, 04:59:01 AM »
enclose the entire project

http://www.file-upload.net/download-9907083/Plugin_FiSH.rar.html

Password: icechat

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: IceChat FisH
« Reply #25 on: November 26, 2014, 01:33:59 PM »
Thank you, I will make some changes, and see if I can get it working.

Did it manage to properly 'decode' a message, have you tested that ?
The IceChat God

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: IceChat FisH
« Reply #26 on: November 26, 2014, 03:20:22 PM »
I have managed to make it work properly, as I can send messages from the mirc plugin back and forth.

So I will just make a few small adjustments, and upload the source code, and you can continue with the plugin.
The IceChat God

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: IceChat FisH
« Reply #27 on: November 26, 2014, 03:44:04 PM »
The updated source code is at:

http://icechat.net/beta/fish.zip

I did remake it on VS2008 as thats what I only have.
The IceChat God

Askerion

  • Newbie
  • *
  • Posts: 19
Re: IceChat FisH
« Reply #28 on: November 29, 2014, 06:43:24 AM »
Hi, thanks it works now.

I do now have the query message encryption.

Do you want to have the plugin later?

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: IceChat FisH
« Reply #29 on: November 29, 2014, 05:31:28 PM »
Yes, if you could send me the last source code, and I can then compile, and add the plugin to the website, in case others would like it.

Thanks
The IceChat God