ULX

Author Topic: Grouping adverts  (Read 2244 times)

0 Members and 1 Guest are viewing this topic.

Offline Jethro

  • Newbie
  • *
  • Posts: 45
  • Karma: 1
Grouping adverts
« on: July 05, 2009, 09:41:02 AM »
On the same subject I have been trying to limit my adverts to only dislay to certain user groups in Ulib. I have found that this does not seem to be working as no matter what group is specified you still see other groups adverts.

Below is a snippet of the server.ini:
Code: [Select]
ulx addCsayAdvert "You're playing on [AGC]'s GMOD Server, enjoy your stay!" 255 8 8 480 15

ulx addCsayAdvert "message" 255 8 8 500 17 none
ulx addCsayAdvert "message" 255 8 8 18 17 none
ulx addCsayAdvert "message" 255 8 8 18 17 none
ulx addCsayAdvert "message" 255 8 8 18 17 none

ulx addCsayAdvert "message" 255 8 8 500 17 regular
ulx addCsayAdvert "message" 255 8 8 18 17 regular
ulx addCsayAdvert "message" 255 8 8 18 17 regular
ulx addCsayAdvert "message" 255 8 8 18 17 regular

ulx addCsayAdvert "message" 255 8 8 500 17 respected
ulx addCsayAdvert "message" 255 8 8 18 17 respected
ulx addCsayAdvert "message" 255 8 8 18 17 respected
ulx addCsayAdvert "message" 255 8 8 18 17 respected
ulx addCsayAdvert "message" 255 8 8 18 17 respected

ulx addCsayAdvert "message" 255 8 8 500 15 member
ulx addCsayAdvert "message" 255 8 8 16 15 member
ulx addCsayAdvert "message" 255 8 8 16 15 member

ulx addCsayAdvert "message" 255 8 8 500 15 resmember
ulx addCsayAdvert "message" 255 8 8 16 15 resmember

ulx addCsayAdvert "message" 255 8 8 500 15 moderator
ulx addCsayAdvert "message" 255 8 8 16 15 moderator
ulx addCsayAdvert "message"  255 8 8 16 15 moderator
ulx addCsayAdvert "message" 255 8 8 16 15 moderator


Below: groups.txt
Code: [Select]
"owner"
{
"deny"
{
}
"allow"
{
"ulx hiddenecho"
"ulx rcon"
"ulx luarun"
"ulx cexec"
"ulx ent"
"ulx adduser"
"ulx adduserid"
"ulx removeuser"
"ulx userallow"
"ulx userdeny"
"ulx addgroup"
"ulx removegroup"
"ulx groupallow"
"ulx groupdeny"
"overcomeimmunity"
}
"inherit_from"
{
"superadmin"
}
}
"superadmin"
{
"deny"
{
}
"allow"
{
"ulx hiddenecho"
"ulx rcon"
"ulx luarun"
"ulx cexec"
"ulx ent"
"ulx adduser"
"ulx adduserid"
"ulx removeuser"
"ulx userallow"
"ulx userdeny"
"ulx addgroup"
"ulx removegroup"
"ulx groupallow"
"ulx groupdeny"
}
"inherit_from"
{
"admin"
}
}
"admin"
{
"deny"
{
}
"allow"
{
"ulib_passtime"
"ulib_passtimeout"
"ulx spawnecho"
"ulx tsay"
"ulx csay"
"ulx gimp"
"ulx mute"
"ulx ungimp"
"ulx unmute"
"ulx gag"
"ulx ungag"
"ulx chattime"
"ulx welcomemessage"
"ulx slap"
"ulx whip"
"ulx slay"
"ulx sslay"
"ulx ignite"
"ulx unignite"
"ulx playsound"
"ulx freeze"
"ulx unfreeze"
"ulx god"
"ulx ungod"
"ulx noclip"
"ulx hp"
"ulx armor"
"ulx cloak"
"ulx uncloak"
"ulx blind"
"ulx unblind"
"ulx jail"
"ulx unjail"
"ulx ghost"
"ulx unghost"
"ulx ragdoll"
"ulx unragdoll"
"ulx maul"
"ulx strip"
"ulx adminmenu"
"ulx clientmenu"
"ulx mapsmenu"
"ulx showmotd"
"ulx banmenu"
"ulx exec"
"ulx rslotsmode"
"ulx rslots"
"ulx rslotsvisible"
"ulx reservedslots"
"ulx bring"
"ulx goto"
"ulx send"
"ulx teleport"
"ulx tooldeny"
"ulx toolallow"
"ulx tooldenyuser"
"ulx toolallowuser"
"ulx tooldenyoverride"
"ulx map"
"ulx kick"
"ulx ban"
"ulx banid"
"ulx unban"
"ulx spectate"
"ulx physgunplayer"
"ulx vote"
"ulx votemap2"
"ulx votekick"
"ulx voteban"
"ulx veto"
"ups_damage"
"ups_vehicle"
"ups_freeze"
"ups_physgun"
"ups_remove"
"ups_tool"
"ups_unfreeze"
"ups_use"
"ups disableplayers"
"ups miscdeletionaccess"
"ulx addnextmap"
}
"inherit_from"
{
"moderator"
}
}
"moderator"
{
"deny"
{
}
"allow"
{
"ulx seeasay"
"ulx map"
"ulx kick"
"ulx ban"
"ulx vote"
"ulx votemap2"
"ulx votekick"
"ulx voteban"
"ulx slap"
"ulx whip"
"ulx slay"
}
"inherit_from"
{
"member"
}
}
"resmember"
{
"deny"
{
}
"allow"
{
"ulx kick"
}
"inherit_from"
{
"member"
}
}
"member"
{
"deny"
{
}
"allow"
{

}
"inherit_from"
{
"respected"
}
}
"respected"
{
"deny"
{
}
"allow"
{
"ulx voteban"
}
"inherit_from"
{
"regular"
}
}

"regular"
{
"deny"
{
}
"allow"
{
"ulx vote"
"ulx votemap2"
"ulx votekick"
}
"inherit_from"
{
"user"
}
}

"user"
{
"deny"
{
}
"allow"
{
"ulx"
"ulx help"
"ulx psay"
"ulx asay"
"ulx thetime"
"ulx menu"
"ulx_valueupdate"
"ulx_cvar"
"ulx_getgamemodes"
"ulx motd"
"ulx_getbans"
"ulx usermanagementhelp"
"ulx who"
"ulx votemap"
}
"inherit_from"
{
}
}
"none"
{
"deny"
{
}
"allow"
{
"ulx logecho"
"ulx logfile"
"ulx logevents"
"ulx logchat"
"ulx logspawns"
"ulx logspawnsecho"
"ulx logdir"
"ulx addgimpsay"
"ulx addadvert"
"ulx addcsayadvert"
"ulx addforceddownload"
"ulx debuginfo"
"ulx voteecho"
"ulx votemap2successratio"
"ulx votemap2minvotes"
"ulx votekicksuccessratio"
"ulx votekickminvotes"
"ulx votebansuccessratio"
"ulx votebanminvotes"
"ulx votemapenabled"
"ulx votemapmintime"
"ulx votemapwaittime"
"ulx votemapsuccessratio"
"ulx votemapminvotes"
"ulx votemapvetotime"
"ulx votemapmapmode"
"ulx votemapaddmap"
}
"inherit_from"
{
}
}

Just wondering if there is something here I have done totally wrong which could cause this problem.
Thanks for taking a look


Jethro
« Last Edit: July 05, 2009, 01:52:00 PM by Megiddo »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ADVERTS AAAH!
« Reply #1 on: July 05, 2009, 11:57:54 AM »
This isn't a behavior that ULX/ULib supports. If it's something you changed, show us your code too.
Experiencing God's grace one day at a time.

Offline Jethro

  • Newbie
  • *
  • Posts: 45
  • Karma: 1
Re: ADVERTS AAAH!
« Reply #2 on: July 05, 2009, 01:03:05 PM »
No I haven't changed any code for either Ulib or ULX. I am using the standard "addCsayAdvert <msg> <r> <g> <repeat_time> <length> [<group>]". The problem is that other groups are receiving the adverts.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ADVERTS AAAH!
« Reply #3 on: July 05, 2009, 01:33:44 PM »
Jethro, the 'group' in the advertising isn't meant to be a ULib membership group.
From our default server.ini file, see the following
Code: [Select]
// If you specify a group, adverts in that group will run sequentially instead of simultaneously. EX:
// ulx addAdvert "This message is run first" 10 a
// ulx addAdvert "This message is run second" 10 a

Perhaps 'grouping' would have been a better description.
Putting ads in the same grouping allows you to keep ads together instead of increasing in time.
Originally, before we added grouping, people wanted ads to be able to say something like
5 minutes "Hello" - ulx addAdvert "Hello" 5
6 minutes "World!" - ulx addAdvert "World!" 6

Problem is, without grouping, that time counts from the beginning of server start; so the problem ended up being
10 minutes "Hello"
12 minutes "world!"
20 minutes "Hello"
24 minutes "World!"
See, time inconsistency on items you want together.

Now, using grouping you can keep ads together.
10 minutes "Hello" ulx addAdvert "Hello" 10 a
1 minute later "World!" - ulx addAdvert "World!" 1 a

20 minutes "Hello"
1 minute later "World!"
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Jethro

  • Newbie
  • *
  • Posts: 45
  • Karma: 1
Re: Grouping adverts
« Reply #4 on: July 05, 2009, 02:48:08 PM »
Thanks for that; I now see why the adds weren't working how I thought. My mind is at rest XD.

Thanks
Jethro