Raised This Month: $32 Target: $400
 8% 

Release Donation Control 3.1.0 [over 1000 donations served!]


Post New Thread Reply   
 
Thread Tools Display Modes
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 11-09-2014 , 18:29   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #451

Quote:
Originally Posted by jpwanabe View Post
Last question. I swear. I use chat color manager for my vips. But this uses it's own database for CC. How can I edit the remove_expired.php so that when it runs, it will check the database cccm for the correct steamid to remove?

This is what I use for my key donation removing.

Code:
<?php
include('db.class.php');
include('db2.class.php');
$db = new Database(*****','****','sourcebans');
$db2 = new databaseRemote('****','****','cccm');

$db->query("SELECT * FROM donations WHERE expire < NOW()");
$data = $db->resultset();
foreach ($data as $key => $value) {
    $db->query('DELETE FROM donations WHERE steam_id = ?')
		->bind(1,$value['steam_id'])
		->execute();
	$db->query('DELETE FROM sb_admins WHERE authid = ?')
		->bind(1,$value['steam_id'])
		->execute();
	
	$db2->query('DELETE FROM cccm_users WHERE auth = ?')
		->bind(1,$value['steam_id'])
		->execute();

	echo "removed - " . $value['steam_id'] . "\n";

}
echo "DONE!";
Im not sure what cccm is or how it works.l and usually dont provide support for 3rd party scripts.
__________________

Last edited by nineteeneleven; 11-09-2014 at 18:36.
nineteeneleven is offline
jpwanabe
Veteran Member
Join Date: Mar 2010
Old 11-09-2014 , 18:32   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #452

Cccm is chat color manager. It let's you set your chat color in the fly from in the server. Is an addition to the chat color plugin that you link in the first post. I would link or but I'm on my phone
__________________
My Steam TF2APP
My sig changes with each load! Refresh to see my other servers!

Last edited by jpwanabe; 11-09-2014 at 18:33.
jpwanabe is offline
captaindeterprimary
AlliedModders Donor
Join Date: Sep 2012
Old 11-12-2014 , 10:07   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #453

Possibly add a plugin to remind them when they are nearing the end if their paid time.
__________________
Last edited by ; Today at 08:20 AM. Reason: Get rid of s
captaindeterprimary is offline
jpwanabe
Veteran Member
Join Date: Mar 2010
Old 11-12-2014 , 10:10   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #454

Quote:
Originally Posted by vman315 View Post
Possibly add a plugin to remind them when they are nearing the end if their paid time.
Yea. I don't have a mail server set up on my box.
__________________
My Steam TF2APP
My sig changes with each load! Refresh to see my other servers!
jpwanabe is offline
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 11-12-2014 , 12:02   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #455

Quote:
Originally Posted by jpwanabe View Post
Yea. I don't have a mail server set up on my box.
If its linux type 'which sendmail' in terminal if thats there u can use the mail functions u probably have to configre exim4 to allow mail to external servers. 'dpkg-reconfigure exim4'
__________________
nineteeneleven is offline
jpwanabe
Veteran Member
Join Date: Mar 2010
Old 11-12-2014 , 12:09   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #456

Quote:
Originally Posted by nineteeneleven View Post
If its linux type 'which sendmail' in terminal if thats there u can use the mail functions u probably have to configre exim4 to allow mail to external servers. 'dpkg-reconfigure exim4'
Windows server 2008. I have 0 experience with linix.
__________________
My Steam TF2APP
My sig changes with each load! Refresh to see my other servers!
jpwanabe is offline
Advokat
Member
Join Date: Mar 2014
Location: Australia
Old 11-15-2014 , 23:09   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #457

Just to note, this conflicts with Cloudflare, at least on current versions of Chrome and Firefox. You're able to workaround most issues with either page rules or excluding specific scripts with the data-cfasync="false" tag but it may catch a few of you off-guard.

Edit: Just noticed that a forward slash was able to get through and break the admin cfg on our servers. The name of the person was along the lines of "..113r/ L..." (replacing the ellipses with the rest of their name). Just a heads up.

Last edited by Advokat; 11-21-2014 at 06:21.
Advokat is offline
Phaiz
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 12-14-2014 , 06:07   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #458

I've been having issues trying to execute the remove_expired.php

Code:
phaiz***bans/scripts$ php remove_expired.php
PHP Warning:  require_once(../includes/config.php): failed to open stream: No such file or directory in /***/bans/scripts/remove_expired.php on line 5
PHP Fatal error:  require_once(): Failed opening required '../includes/config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /***/bans/scripts/remove_expired.php on line 5
__________________
Phaiz is offline
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 12-14-2014 , 18:54   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #459

Quote:
Originally Posted by Phaiz View Post
I've been having issues trying to execute the remove_expired.php

Code:
phaiz***bans/scripts$ php remove_expired.php
PHP Warning:  require_once(../includes/config.php): failed to open stream: No such file or directory in /***/bans/scripts/remove_expired.php on line 5
PHP Fatal error:  require_once(): Failed opening required '../includes/config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /***/bans/scripts/remove_expired.php on line 5
Doew it happen if u visit the script in your browser?
__________________
nineteeneleven is offline
Phaiz
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 12-14-2014 , 20:33   Re: Donation Control 3.1.0 [over 1000 donations served!]
Reply With Quote #460

Quote:
Originally Posted by nineteeneleven View Post
Doew it happen if u visit the script in your browser?
If i try to go to the script in my browser I just see a blank page.
__________________
Phaiz is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode