z

Welcome Message on Twofo

Chat about twofo and other information sharing portals.

Moderator: Operators

Speedydowt
Posts: 5
Joined: Fri Dec 11, 2009 3:31 pm

Welcome Message on Twofo

Postby Speedydowt » Fri Jan 22, 2010 11:40 am

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
User avatar
cocodude
Uber Forum Spammer
Posts: 629
Joined: Tue Oct 04, 2005 5:29 pm
Location: London
Contact:

Re: Welcome Message on Twofo

Postby cocodude » Fri Jan 22, 2010 6:11 pm

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";
http://www.gigatux.com - Value Linux Virtual/Shared Hosting
Speedydowt
Posts: 5
Joined: Fri Dec 11, 2009 3:31 pm

Re: Welcome Message on Twofo

Postby Speedydowt » Fri Jan 22, 2010 7:14 pm

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?
User avatar
cocodude
Uber Forum Spammer
Posts: 629
Joined: Tue Oct 04, 2005 5:29 pm
Location: London
Contact:

Re: Welcome Message on Twofo

Postby cocodude » Sat Jan 23, 2010 3:50 pm

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!
http://www.gigatux.com - Value Linux Virtual/Shared Hosting
User avatar
echelon
Uber Forum Spammer
Posts: 895
Joined: Fri Oct 07, 2005 8:22 pm

Re: Welcome Message on Twofo

Postby echelon » Thu Aug 26, 2010 2:21 pm

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

Who is online

Users browsing this forum: No registered users and 1 guest