collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Auto invite module  (Read 2085 times)

0 Members and 1 Guest are viewing this topic.

Offline Swiftgank

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Auto invite module
« on: November 18, 2006, 03:40:02 pm »
Is it possible to write a module that enables the user to set weather he or she wants to be auto invited to bot at logon or not. like !auto on (bot send you invite to guest at logon) !auto off (bot only show you logged on in chat but dont send invite to guest.). Insted of having auto invite all or none setting. some dont like getting invites every logon, some does.

!autoinv on (for getting invites at logon)
!autoinv off (for not getting invites at logon)   or something similar.

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Auto invite module
« Reply #1 on: November 18, 2006, 04:49:01 pm »
This code's a bit old/modified from what's posted on the forums, but you can get the idea. :)

Using /tells:
!inv on
!inv off
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Swiftgank

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Auto invite module
« Reply #2 on: November 18, 2006, 05:35:34 pm »
thanks :)

Offline taconis

  • BeBot User
  • **
  • Posts: 34
  • Karma: +0/-0
Re: Auto invite module
« Reply #3 on: January 06, 2007, 05:26:58 am »
Naturalistic,

Is there a way to code autoinv.php so that when one logs in and they're on the buddy list but not on the member list, that it only autoinv's the "guest" and not the "member"?  I looked at the coding and am unsure.  Our org is using 2.10 with logon.php and autoinv.php.  But it autoinv's all rather than just the folks from the guestlist.

Just thinkin' out loud...

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Auto invite module
« Reply #4 on: January 06, 2007, 05:32:42 am »
Yes, under the function buddy, just do a check

if (user logs in), check to see if they are in the guest list, if they are, invite.

Too tired atm to post the code, can tomorrow >_<
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Lucid

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Auto invite module
« Reply #5 on: February 05, 2007, 10:09:36 am »
I had a look at the stock autoinv for 0.3.3 and the buddy function does a check to see if the character logging in is a buddy.  I changed the check based on a code comment in the Bot.php file to check for a value of 2:

Code: [Select]
if (($this -> auto == 1) && ($msg == 1) && ($this -> bot -> is_member($name) == 2))
The is member function had this to say:

Code: [Select]
is_member($name) : returns if person is a member of the bot (true = member, 2 = guest, false = unknown)
Didn't seem to work for me though.

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 839
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal