|
| Author |
Message |
VIPER Young One

Joined: 22 Nov 2003 Posts: 50
   
|
Posted: Thu Jan 01, 2004 3:39 pm Post subject: |
|
|
ok i can get it to sign in but cos i have the multi-admin, mods, smods those commands dont work it just says a normal reply like what are you talking about..
anyhelp be great
thanks |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Fri Jan 02, 2004 2:26 am Post subject: |
|
|
| if you are storing them in txt files make sure the paths to the files are correct |
|
| Back to top |
|
 |
Luke Member

Joined: 01 Nov 2003 Posts: 111
   
|
Posted: Fri Jan 02, 2004 4:44 am Post subject: |
|
|
| If it's *nix you might want to chmod + set the directorys appropriately to the dir of the files like: /home/bot/txt/file.txt |
|
| Back to top |
|
 |
VIPER Young One

Joined: 22 Nov 2003 Posts: 50
   
|
Posted: Fri Jan 02, 2004 11:08 am Post subject: |
|
|
nope not working... its linux redhat and yes i does load from a TXT file but it still wont work *lazy* tryed: /home/morpheus/public_html/cgi-bin/bot/admins.txt /public_html/cgi-bin/bot/admins.txt ./bot/admins.txt /home/cgi-bin/bot/admins.txt
all wont work and i CHMODed all to 777 and wont work...
any ideas? |
|
| Back to top |
|
 |
Mojave Almost An Agent

Joined: 01 Nov 2003 Posts: 1434
 
|
Posted: Fri Jan 02, 2004 12:01 pm Post subject: |
|
|
Well, what exactly isn't working?
You can't read the admins text file? You can't write to the admins text file? You can read/write fine, but you can't connect admins/mods with their commands? Or something else?
Sounds like it's probably a simple path problem. Have you tried just ./admins.txt? Since that file is normally in the same directory as the bot. |
|
| Back to top |
|
 |
VIPER Young One

Joined: 22 Nov 2003 Posts: 50
   
|
Posted: Sat Jan 03, 2004 12:26 pm Post subject: |
|
|
nope the ./admins.txt wont work
i dont know its like it wont read from the admins.txt file its at http://morpheus.exero.net/cgi-bin/bot/ ---------------------------------------------admins.txt ---------------------------------------------smods.txt ---------------------------------------------mods.txt
got any ideas?? |
|
| Back to top |
|
 |
Sypher Senior Member

Joined: 01 Jan 2004 Posts: 233 Location: The Netherlands
    
|
Posted: Sat Jan 03, 2004 1:04 pm Post subject: |
|
|
Guess you're not allowed to use .txt extensions in the cgi-bin dir  _________________ Sypher
Developer of Codera |
|
| Back to top |
|
 |
VIPER Young One

Joined: 22 Nov 2003 Posts: 50
   
|
Posted: Sat Jan 03, 2004 3:19 pm Post subject: |
|
|
well *lazy* tryed it out side of the cgi-bin and still wont work  |
|
| Back to top |
|
 |
clcool Senior Member

Joined: 02 Nov 2003 Posts: 171
    
|
Posted: Sat Jan 03, 2004 4:50 pm Post subject: |
|
|
cgi-bin/data
/\ i made a dir called data and CHMOD'd it to 777 (it asked me if I wanted to apply it to files inside the dir when I did it) (that was using Ws_FTP pro trial)
and then I could read and write to txt files in it..
(where the pl file doing it is in the cgi-bin)
| Code: | | <br />#Writing<br /><br />open (DATA, ">>./data/something.txt");<br />print DATA "Appending data!!\n\n";<br />close(DATA);<br /> |
| Code: | | <br />#Reading<br /><br />open (FILE, "./data/something.txt");<br />my @stuff = <FILE>;<br />close (FILE);<br /> |
I don't know if this will help or not..
--------
Just remembered, try adding
| Code: | | <br />use LWP::Simple;<br />use File::Basename;<br /> |
I think the file::basename may make it work  _________________ http://www.polylogical.co.uk |
|
| Back to top |
|
 |
VIPER Young One

Joined: 22 Nov 2003 Posts: 50
   
|
Posted: Sun Jan 04, 2004 12:47 am Post subject: |
|
|
| where do i get that??? |
|
| Back to top |
|
 |
Nate God Like

Joined: 12 Nov 2003 Posts: 553
    
|
Posted: Sun Jan 04, 2004 2:41 am Post subject: |
|
|
File::Basename usually comes with Perl.
If not, search CPAN.org for it. |
|
| Back to top |
|
 |
Joe Young One

Joined: 09 Nov 2003 Posts: 89
   
|
Posted: Sun Jan 04, 2004 2:46 am Post subject: |
|
|
have *lazy* tryed chmodding it to 755? I use to run my bot Dex from a webserver. But I put the txt files somewhere other than a cgi-bin.. It works really well, then I got ssh and yea.. edit: The logs were put somewhere else and everything still worked.. |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Sun Jan 04, 2004 12:29 pm Post subject: |
|
|
or you could store them another way than text files, like making a global variable at the top of bot.pl
| Code: | | $admins->{'some@email.com'} = 1;<br />$admins->{'second@email.com'} = 1; |
then when you want admin only commands
| Code: | | sub block<br />{<br /> my ($victim,$msg,$self) = @_;<br /> if ($admins->{$victim} == 1)<br /> {<br /> $msg =~ /^(.*) (.*)$/;<br /> $msn->block($2);<br /> $reply = "$2 blocked.";<br /> }<br /> else<br /> {<br /> $reply = "nope. admin only";<br /> }<br /> return $reply;<br />}<br />1; |
|
|
| Back to top |
|
 |
VIPER Young One

Joined: 22 Nov 2003 Posts: 50
   
|
Posted: Sun Jan 04, 2004 12:29 pm Post subject: |
|
|
nope wont work talk to me on MSN webmaster@exero.net |
|
| Back to top |
|
 |
Joe Young One

Joined: 09 Nov 2003 Posts: 89
   
|
Posted: Mon Jan 05, 2004 8:31 pm Post subject: |
|
|
| will do! I use to run Dex solely from a webserver and he worked fine. |
|
| Back to top |
|
 |
|