public static void messengerInvite(String sender, int messengerid, String target, int fromchannel, boolean gm) {

            if (isConnected(target)) {

                int ch = Find.findChannel(target);
                if (ch > 0) {
                    MapleCharacter from = ChannelServer.getInstance(fromchannel).getPlayerStorage().getCharacterByName(sender);
                    MapleCharacter targeter = ChannelServer.getInstance(ch).getPlayerStorage().getCharacterByName(target);
                    if (targeter != null && targeter.getMessenger() == null) {
                        if (!targeter.isIntern() || gm) {
                            targeter.getClient().getSession().write(CField.messengerInvite(from.getClient(), sender, messengerid));
                            from.getClient().getSession().write(CField.messengerNote(target, 4, 1));
                        } else {
                            from.getClient().getSession().write(CField.messengerNote(target, 4, 0));
                        }
                    } else {
                        from.getClient().getSession().write(CField.messengerChat(sender, " : " + target + " is already using Maple Messenger"));
                    }
                }
            }

        }