Page 1 of 1

Welcome Message on Twofo

Posted: Fri Jan 22, 2010 11:40 am
by Speedydowt
Hi guys,

Firstly, I wanted to thank you for all the help you've given me in setting up Loughborough's DC hub, (which is currently very small and just getting off the ground, can be found at goldtrail.game-host.org:4144)

I hate to keep asking questions, so please tell me where to go if you don't want to answer.

My question is:

When you first login to Twofo's DC hub you get the Welcome message from Dogtanian and it checks where you connecting to (presumably either from localhost or hub.towofo.co.uk) then changes the welcome message accordingly. I have asked Astro before and he did give me a good answer of just being a basic IF command. However I'm struggling where to enter it on YNHub.

I was wondering if anyone had any other suggestions? (I appricated your not using YnHub so things might be slightly different)

thanks again guys/girls

tom

Re: Welcome Message on Twofo

Posted: Fri Jan 22, 2010 6:11 pm
by cocodude
Isn't this actually the bot (Dogtanian) posting the message?

In Perl:

Code: Select all

#-- Check for Passive or Active Mode.
    if (odch::get_description($user) =~ /\<.*,M\:A,.*\>/) {
        ($usermode) = "          Client Type:        ACTIVE / ";
        ($active)   = 1;
    }
    if (odch::get_description($user) =~ /\<.*,M\:P,.*\>/) {
        ($usermode) = "          Client Type:        PASSIVE / ";
        ($active)   = 0;
    }

#-- Check for registered/not registered mode
    ($registered) = odch::check_if_registered($user);

    if ($registered == 0) {
        ($usermode) .= "UNREGISTERED / ";
    } else {
        ($usermode) .= "REGISTERED / ";
    }

#-- Check for resnet connection
    #-- if (odch::get_ip($user) eq "192.146.136.129") {
    if ((odch::get_ip($user) =~ /137\.205.*/) || (odch::get_ip($user) =~ /127\.0\.0\.1/)) {
      ($resnet) = 1;
    } else {
      ($resnet) = 0;
    }

    if ($resnet == 1) {
      ($usermode) .= "RESNET";
    } else {
      ($usermode) .= "EXTERNAL";

Re: Welcome Message on Twofo

Posted: Fri Jan 22, 2010 7:14 pm
by Speedydowt
Yeah it is indeed Dogtanian, I'm just wondering where and how i would input that as a automatic text commands on login. That script is a Godsend- thanks very much- I just wonder if perlscript works in YnHub as a textcommand!

Thanks again cocodude

p.s would you still be interested in having Loughborough as seperate two venture?

Re: Welcome Message on Twofo

Posted: Sat Jan 23, 2010 3:50 pm
by cocodude
You just have the bot running all the time, and it detects new users coming onto the hub.

I'm definitely interested in a Loughborough section of twofo - it seems to make sense!

Re: Welcome Message on Twofo

Posted: Thu Aug 26, 2010 2:21 pm
by echelon
Firstly everyone knows what I think of YnHub (mainly because of what OS it is running on)..

Secondly Perl FTW and all hail the Dog :P