[UBERMU] Welcome Message from db[UBEREMU]
Find:
Code:
UberEnvironment.GetGame().GetAchievementManager().UnlockAchievement(this, 11, 1);
Place this text:
Code:
int welcomemessage_enabled;
string welcomemessage;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
welcomemessage_enabled = dbClient.ReadInt32("SELECT value FROM config WHERE variable_name = 'welcome_message_enabled' LIMIT 1");
welcomemessage = dbClient.ReadString("SELECT value FROM config WHERE variable_name = 'welcome_message' LIMIT 1");
}
if (welcomemessage_enabled == 1)
SendNotif(welcomemessage);
Code:
CREATE TABLE `config` (
`variable_name` varchar(255) NOT NULL,
`value` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `config` VALUES ('welcome_message_enabled', '1');
INSERT INTO `config` VALUES ('welcome_message', 'Tervetuloa- teksti');
You can put your welcome message on or off.
Re: [UBERMU] Welcome Message from db[UBEREMU]
Nice release! Will try later! Good job! First post :):
Re: [UBERMU] Welcome Message from db[UBEREMU]
Would be better if you read it from the config though , Like my edit has :P
Code:
string WelcomeMessage;
string WelcomeMessageEnabled;
WelcomeMessageEnabled = UberEnvironment.GetConfig().data["welcome.message.enabled"];
WelcomeMessage = UberEnvironment.GetConfig().data["welcome.message"];
if (WelcomeMessageEnabled == "yes")
{
SendNotif(WelcomeMessage);
}
and add this in you'r config.conf
Code:
## Welcome Message
welcome.message.enabled=yes
welcome.message=Tweeney is ghey
Re: [UBERMU] Welcome Message from db[UBEREMU]
Quote:
Originally Posted by
PEjump2
Would be better if you read it from the config though , Like my edit has :P
Code:
WelcomeMessage = UberEnvironment.GetConfig().data["welcome.message"];
SendNotif(WelcomeMessage);
and add this in you'r config.conf
Code:
## Welcome Message
welcome.message=Tweeney is ghey
Seems nice! If i use your pejump should i place it under the same line?
Re: [UBERMU] Welcome Message from db[UBEREMU]
Oh ok, nice to know PEjump2
But i am not ghey
Re: [UBERMU] Welcome Message from db[UBEREMU]
Quote:
Originally Posted by
stoffe89
Seems nice! If i use your pejump should i place it under the same line?
Yewp :P
Quote:
Originally Posted by
tweeney
Oh ok, nice to know PEjump2
But i am not ghey
I saw you'r gay video's on you'r computer!
Re: [UBERMU] Welcome Message from db[UBEREMU]
Quote:
Originally Posted by
PEjump2
Would be better if you read it from the config though , Like my edit has :P
Code:
string WelcomeMessage;
string WelcomeMessageEnabled;
WelcomeMessageEnabled = UberEnvironment.GetConfig().data["welcome.message.enabled"];
WelcomeMessage = UberEnvironment.GetConfig().data["welcome.message"];
if (WelcomeMessageEnabled == "yes")
{
SendNotif(WelcomeMessage);
}
and add this in you'r config.conf
Code:
## Welcome Message
welcome.message.enabled=yes
welcome.message=Tweeney is ghey
Amazing how minds think alike. I use this exact code hahahah.
Re: [UBERMU] Welcome Message from db[UBEREMU]
Quote:
Originally Posted by
ACADEMiC
Amazing how minds think alike. I use this exact code hahahah.
Ripper! :@
Re: [UBERMU] Welcome Message from db[UBEREMU]
But using mysql way you won't have to reboot server to enable the welcome message :L
Re: [UBERMU] Welcome Message from db[UBEREMU]
Quote:
Originally Posted by
matty13
But using mysql way you won't have to reboot server to enable the welcome message :L
Uhm, Yeah i guess that's true but, if you use an XSS exploit in UberCMS you can edit the welcome message so i think my method is more secured.
And who edits their Welcome Message 3 times a day anyways? :P
Re: [UBERMU] Welcome Message from db[UBEREMU]
Quote:
Originally Posted by
PEjump2
Uhm, Yeah i guess that's true but, if you use an XSS exploit in UberCMS you can edit the welcome message so i think my method is more secured.
And who edits their Welcome Message 3 times a day anyways? :P
Only SQL Exploits and if you do SQL Exploit then anything is possible to deleting users, editing furni data etc. But yeah yours would be more secure and i always think Welcome Messages suck anyway.
Re: [UBERMU] Welcome Message from db[UBEREMU]
Re: [UBERMU] Welcome Message from db[UBEREMU]
Quote:
Originally Posted by
PEjump2
Ripper! :@
lol? i ain't a ripper.
I know this is sus, but this is mine, I can assure you.
Code:
// What are the strings for today, sir?
string WelcomeMessage;
string WelcomeMessageEnabled;
// So where do I look in the config?
WelcomeMessageEnabled = UberEnvironment.GetConfig().data["welcome.message.enabled"];
WelcomeMessage = UberEnvironment.GetConfig().data["welcome.message"];
// Oh, okay. So is it enabled?
if (WelcomeMessageEnabled == "yes")
{
SendNotif(WelcomeMessage);
}
Re: [UBERMU] Welcome Message from db[UBEREMU]
Your'r still an faggot ripper, cuz that's my code you only added a few commented lines :l
Re: [UBERMU] Welcome Message from db[UBEREMU]
Where i´m put this ? I can´t find it !
Re: [UBERMU] Welcome Message from db[UBEREMU]
Quote:
Originally Posted by
PEjump2
Your'r still an faggot ripper, cuz that's my code you only added a few commented lines :l
mmmk?
Re: [UBERMU] Welcome Message from db[UBEREMU]
Quote:
Originally Posted by
PEjump2
Would be better if you read it from the config though , Like my edit has :P
Code:
string WelcomeMessage;
string WelcomeMessageEnabled;
WelcomeMessageEnabled = UberEnvironment.GetConfig().data["welcome.message.enabled"];
WelcomeMessage = UberEnvironment.GetConfig().data["welcome.message"];
if (WelcomeMessageEnabled == "yes")
{
SendNotif(WelcomeMessage);
}
and add this in you'r config.conf
Code:
## Welcome Message
welcome.message.enabled=yes
welcome.message=Tweeney is ghey
Where do i put this?
Re: [UBERMU] Welcome Message from db[UBEREMU]