|
| Author |
Message |
Snolar Young One

Joined: 24 Jan 2004 Posts: 82
   
|
Posted: Wed Feb 18, 2004 8:21 pm Post subject: |
|
|
Hi,
sorry for asking again i will make my own commands soon lol
Database command - Mods and above, can store everything that happens, eg. !database Blocked eg@eg.com for flooding. Then supermods and above can view it, bla bla. |
|
| Back to top |
|
 |
night Not Yet a God

Joined: 06 Jan 2004 Posts: 498
    
|
Posted: Wed Feb 18, 2004 8:38 pm Post subject: |
|
|
seen it brave bot as it  |
|
| Back to top |
|
 |
Snolar Young One

Joined: 24 Jan 2004 Posts: 82
   
|
Posted: Wed Feb 18, 2004 8:41 pm Post subject: |
|
|
yeah i know i need the command  |
|
| Back to top |
|
 |
night Not Yet a God

Joined: 06 Jan 2004 Posts: 498
    
|
Posted: Wed Feb 18, 2004 9:00 pm Post subject: |
|
|
| well *lazy* not ask braveheart then rofl |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Wed Feb 18, 2004 9:37 pm Post subject: |
|
|
Thats not a database realy. Just logging something for the admins. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
BraveHeart Senior Member

Joined: 14 Jan 2004 Posts: 285
   
|
Posted: Thu Feb 19, 2004 7:38 am Post subject: |
|
|
Yes, Exactly  |
|
| Back to top |
|
 |
night Not Yet a God

Joined: 06 Jan 2004 Posts: 498
    
|
Posted: Thu Feb 19, 2004 11:21 am Post subject: |
|
|
weeeeeeeeeeeeeeeeeeeeeeeeeell same thing brave dude was your bot ok after lastnite? i saw a flooder tryin 2 take it down... |
|
| Back to top |
|
 |
Snolar Young One

Joined: 24 Jan 2004 Posts: 82
   
|
Posted: Thu Feb 19, 2004 1:26 pm Post subject: |
|
|
| got the command lol eric. |
|
| Back to top |
|
 |
Snolar Young One

Joined: 24 Jan 2004 Posts: 82
   
|
Posted: Thu Feb 19, 2004 2:34 pm Post subject: |
|
|
Dont worry. Done it Just edited the request command.  |
|
| Back to top |
|
 |
Snolar Young One

Joined: 24 Jan 2004 Posts: 82
   
|
Posted: Thu Feb 19, 2004 2:59 pm Post subject: |
|
|
Right, Slight problem. I don't know if ive edited this right, This is the record command for mods, supermods ok, I just changed some parts.
| Code: | | sub record<br />{<br /> my ($bot, $self, $user, $msg) = @_;<br /> <br /> if ($msg ne '')<br /> {<br /> use Storable;<br /> <br /> my $message = "$user: $msg";<br /> <br /> my $messages = retrieve('records.dat') if (-e 'records.dat');<br /><br /> my $num;<br /> my $records;<br /><br /> foreach my $key (sort (keys %{$messages}))<br /> {<br /> $num++;<br /> $records->{$num} = $messages->{$key};<br /> }<br /> <br /> $num = keys %{$records};<br /> <br /> $records->{$num + 1} = $message;<br /> <br /> store ($records, 'records.dat');<br /> <br /> return "Thanks :) You have now recorded what happened in the database for the owner to see.";<br /> }<br /> else<br /> {<br /> return "$bot->{settings}->{CommandChar}help usage request <-- for help";<br /> }<br />}<br /><br />{<br /> Category => '(#)Mod Commands(#)',<br /> Usage => 'record event',<br /> Description => 'Record what happened for the owner to see. Eg, !record Blocked so@so.com because...',<br />}; |
But when I view it by typing !viewrecords i edited the view command :
| Code: | | sub viewrecords<br />{<br /> my ($bot, $self, $user, $msg) = @_;<br /> <br /> if (-e 'records.dat')<br /> {<br /> use Storable;<br /> my $records = retrieve('records.dat');<br /> my $reply;<br /> <br /> foreach my $key (sort (keys %{$records}))<br /> {<br /> $reply .= $key . "-" . $records->{$key} . "\n";<br /> }<br /> chomp ($reply);<br /> return $reply;<br /> }<br /> else<br /> {<br /> return "There were no messages stored";<br /> }<br />}<br /><br />{<br /> Category => '(ip)Admin Commands(ip)',<br /> Description => 'Retrieve event records',<br />}; |
It says there are no msgs. so I typed !view, Which is the one for the users help, and it was in there. Got any ideas how i could fix this? |
|
| Back to top |
|
 |
Snolar Young One

Joined: 24 Jan 2004 Posts: 82
   
|
Posted: Thu Feb 19, 2004 5:39 pm Post subject: |
|
|
| Anyone? |
|
| Back to top |
|
 |
night Not Yet a God

Joined: 06 Jan 2004 Posts: 498
    
|
Posted: Thu Feb 19, 2004 7:56 pm Post subject: |
|
|
erm... lol, my bots already got 1 of these id 4got bout it tho  |
|
| Back to top |
|
 |
Snolar Young One

Joined: 24 Jan 2004 Posts: 82
   
|
Posted: Thu Feb 19, 2004 8:20 pm Post subject: |
|
|
| doesnt really help lol |
|
| Back to top |
|
 |
Rameses Senior Member

Joined: 02 Feb 2004 Posts: 182
   
|
Posted: Sun Feb 29, 2004 2:18 am Post subject: |
|
|
Hey Snolar... Sorry for replying so late, but it took me forever to find this forum. Well, I really don't work with MSN, so I can't help you a whole ton, but maybe you can take my AIM coding that I wrote up for you and try to convert it to MSN. K, here you go.. (By the way, I am using .txt files not .dat I hope it doesn't make a huge difference)
record.pl
| Code: | | sub record {<br />$time = localtime();<br />$msg =~ s/\!record //ig;<br />open(FILE, ">>data.txt");<br />print(FILE "\[$user \($time\): $msg\] ");<br />close(FILE);<br />$reply = "Your message \(\"$msg\"\) was recorded for the owner to see!";<br />return $reply;<br />}<br />1; |
So if sombody typed "!record I did something just now", it would send back: "Your message ("I did something just now") was recorded for the owner to see!" Here is viewrecords.pl.
viewrecords.pl
| Code: | | sub viewrecords {<br />if(-e "data.txt"){<br />open(FILE, "data.txt");<br />$records = <FILE>;<br />close(FILE);<br />$reply = "Here are all the records:\n\n$records";<br />}else{<br />$reply = "There are currently no records!";<br />}}<br />1; |
So Maybe I type ".viewrecords". It might say the following:
| Quote: | | [agoodmod247 (Sat Feb 28 16:12:39 2004): I blocked badperson40 for using profanity] [abadmod4576 (Sun Feb 29 10:05:14 2004): yo i bloCKed this 1 freek caus it were funny] |
Anyway, um.. I hope it helps a little bit. |
|
| Back to top |
|
 |
Peter's MSN Bot Young One

Joined: 24 Feb 2004 Posts: 86
   
|
Posted: Thu Mar 04, 2004 1:08 pm Post subject: |
|
|
*lazy* could use php!!!
| Code: | | <br />my $code = LWP::Simple::get( "LINK TO DATABASE.php" ); |
*lazy* could use a mysql database in the php file
im not sure about adding stuff but maybe sumthing like dis:
|
|
| Back to top |
|
 |
|